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

What's php?

621


What is a controller php?

493


Explain converting an object?

598


What is mysql_fetch_array?

512


What is csrf token in php?

539






Why triggers are used in mysql?

520


Does php have a future?

503


How to store the uploaded file to the final location?

504


Is null function in php?

556


How to merge values of two arrays into a single array?

476


what is constructor

1057


What does a delimiter do in mysql?

520


Php says that an array is an ordered map. But how the values are ordered in an array?

583


What is $_ server request_method == post?

528


Why sessions are used in php?

494