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
Is php an array?
Tell me how can we automatically escape incoming data?
What is ci in php?
what is the current salary package in India for a PHP programmer who has 1.5 years experience
What is difference between mysql_connect and mysqli_connect?
How does firefox manage cookies?
Tell me what is the use of explode() function?
Explain about the connective abilities of the PHP?
What is the name of scripting engine in php?
What is escape data in php?
Do you know how can php and html interact?
What are the different tables(engine) present in mysql, which one is default?
Does php support polymorphism?
discuss the issue of software theft in ghana and how it has affected the economy
What is session_start () in php?