This form works when i upload an image using it but doesn't work when i upload a video. What do i need to change to upload videos via this form?
$videoform = "
<form action='' method='post' enctype='multipart/form-data' name='uploadform'>
<input name='video' type='file' id='video' >
<input name='upload' type='submit' id='upload' value=' Upload Video! '>
</form>";
echo $form;
if($_POST['upload'])
{
echo $videoform;
}
if(isset($_POST['upload']))
{
// define the posted file into variables
$name = $_FILES['video']['name'];
$tmp_name = $_FILES['video']['tmp_name'];
$type = $_FILES['video']['type'];
$size = $_FILES['video']['size'];
echo $name;
}
echo "<br /><h5>$cname 's Videos</h5>";
?>