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
Tell me what does pear stands for?
Where do we use get and post?
What is variable function php?
Explain the different types of errors in php.
What are the benefits of using queries?
What is the meaning of a persistent cookie?
Is laravel an oop?
What is cms php?
Can we use onclick in submit button?
What is the content of /etc directory?
Which cryptographic extension provide generation and verification of digital signatures?
What is sticky form in php?
Explain mysql_errno()?
What is the functionality of the functions strstr() and stristr()?
What is the different between count() and sizeof() in php?