Jump to content

Upload videos


ecabrera

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.