how to uploade video in php????

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to delete an element from an array?

647


Explain what is the difference between $var and $$var?

616


Difference between get and post method.

626


How do you remove duplicates from an array?

734


How to run a php script?

648






Is php the same as html?

629


How can we increase execution time of a php script?

561


Which php framework is in demand?

535


What is the use of rand() in php?

687


List types of array are available in php?

634


How to create a public static method in PHP?

630


What is prepare in php?

609


What is the correct line to use within the php.ini file, to specify that 128mb would be the maximum amount of memory that a script may use?

660


What is mvc php?

610


Why triggers are used in mysql?

601