how to uploade video in php????



how to uploade video in php????..

Answer / rashmi bajpai

On php coding file like uploaded.php<?php
$target_path="../upload/";//this is the name of that folder
in which we r uploading our video.//
$arg=$_FILES['uploadedfile']['tmp_name'];
if(move_uploaded_file($tmp,$target_path))
{
echo "The file". $_FILES['uploadedfile']['name']."has been
uploaded";
}
else
{
echo"there was an error in uploading";
}
?>


On other html file like uploaded.php:
<html>
<form enctype="multipart/form-data" action="uploaded.php"
method="post">//file should always be uploaded by post method.
<input type="hidden" name="MAX_FILE_SIZE" value="100000"/>
Choose a file to upload:
<input name="uploaded file" type="file"/> <br>
<input type="submit" value="upload file"/>
</form>
</html>

Is This Answer Correct ?    24 Yes 3 No

Post New Answer

More PHP Interview Questions

What is php and sql used for?

0 Answers  


How can we encrypt and decrypt a data present in a mysql table using mysql?

3 Answers   Microsoft,


How to declare an array in php?

0 Answers  


Why did you choose this particular career path?

0 Answers  


How are php sessions stored?

0 Answers  


How do I make a reset button in html?

0 Answers  


how to extract month from given date by using string functions?

3 Answers  


Would you initialize your strings with single quotes or double quotes?

4 Answers  


How to convert a timezone from one to another ?

1 Answers  


What is the use of header in php?

0 Answers  


Why do we use hooks?

0 Answers  


What is cookie and session in php?

0 Answers  


Categories