Jump to content

Recommended Posts

is there a way to upload video i try uploading video but wont let me

 

<?php
$name = $_FILES['upload']['name'];
$ext = strtolower(substr($name,strpos($name,'.') +1));
$size = $_FILES['upload']['size'];
$maxsize = 1073741824;
$tmp = $_FILES['upload']['tmp_name'];

$move = "uploads/";

if(isset($name)){
if(!empty($name)){
	if($size <= $maxsize){
		if($ext == 'flv' || $ext == 'fla' || $ext == 'mp4'){
			if(move_uploaded_file($tmp,$move.$name)){
				echo "Uploaded";
			}else
				echo "Error has happen try again later";
		}else
			echo "Image must be a jpg, jpeg, or png";
	}else
		echo "You must select a smaller image size";
}else
	echo "You must select a image";
}
?>
<form action="video.php" method="post" enctype="multipart/form-data" >
<input type="file" name="upload" /><br>
<input type="submit" name="submitbtn" />
</form>

Link to comment
https://forums.phpfreaks.com/topic/258451-upload-videos/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.