can any one show the complete code for uploading video files in php.

//This is the code for  video uploading you will make a folder of videos and save your videos there and if you want to save your videos in database you just have to save its name like i have done 
<?php
if (isset($_REQUEST['upload']))
{
$name=$_FILES['uploadvideo']['name'];
 $type=$_FILES['uploadvideo']['type'];
//$size=$_FILES['uploadvideo']['size'];
$cname=str_replace(" ","_",$name);
$tmp_name=$_FILES['uploadvideo']['tmp_name'];
$target_path="video/";
$target_path=$target_path.basename($cname);
if(move_uploaded_file($_FILES['uploadvideo']['tmp_name'],$target_path))
{
echo $sql="INSERT INTO tbl_video(name,type) VALUE('".$cname."','".$type."')"; 
$result=mysql_query($sql);
echo "Your video ".$cname." has been successfully uploaded";
}
}

?>
<form name="video" enctype="multipart/form-data" method="post" action="">
<input name="MAX_FILE_SIZE" value="100000000000000"  type="hidden"/>
<input type="file" name="uploadvideo" />
<input type="submit" name="upload" value="SUBMIT" />
</form>
commented: useful post +5
Member Avatar for diafol

Nice to see the noobs are making an effort.

code for video upload is not working for more than 5 mb please help me

this code cant uplooad more than 5mb videos.pls help me

Check your PHP.INI file for upload_max_filesize and post_max_size.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.