Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how we can upload and view video files

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


Please Help Members By Posting Answers For Below Questions

What are the uses of implode() function?

1090


What is the difference between Session and Cookie?

1065


How are cookies created?

961


Explain about the data types in PHP?

971


When are you supposed to use endif to end the conditional statement?

944


What is session and why do we use it?

1052


How to get the length of string?

1031


Is null check in php?

997


Tell me what is needed to be able to use image function?

981


Can we use onclick in submit button?

1025


What type of comments are supported by PHP.

992


What is use of htmlspecialchars php?

1035


Is PHP an open source software?

1063


How can we enable error reporting in php?

1042


What is meant by MIME?

1042