Answer Posted / laxmikant
if($_POST['submit'])
{
if($_FILES['video']['error']>0)
{
echo "error in ur file";
}
else
{
$target_path = "uploads/";
echo $target_path = $target_path . $_FILES['video']['name'];
if(move_uploaded_file($_FILES['video']['tmp_name'],
$target_path)) {
echo "The file ". basename( $_FILES['video']['name']).
" has been uploaded";
} else{
echo "There was an error uploading the file, please try
again!";
}
}
}
<form name="f" action="" method="post"
enctype="multipart/form-data">
<input type="file" name="video" />
<input type="submit" name="submit" value="submit" />
</form>
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
How to find a specific value in an array?
sort term descripttion form, report and uery
What are the features of php 7?
What is escaping to php?
What type of errors can be occurred in php?
Why and where do we use htaccess?
What is the integer?
What is the difference between query and inquiry?
What is difference between get and post in php?
What are the uses of explode() and implode() functions?
Is php harder than javascript?
Is php closing tag necessary?
What does $_env means?
What does a special set of tags do in php?
What distinguishes php from something like client side java script?