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

Is it possible to destroy a cookie?

932


How to access standard error stream in PHP?

1044


How to create reusable code in php?

983


Write a program to find a string is palindrome or not?

908


Why does php start with variables?

967


Name some of the constants in php and their purpose.

929


How to execute an sql query? How to fetch its result?

1046


What is the difference between php and java?

932


Tell me will a comparison of an integer 12 and a string "13" work in php?

1025


How do you connet mysql database with php?

1015


What are the different errors in php?

952


What is the importance of "method" attribute in a html form?

970


What is difference between put and post method in http?

970


Why should I learn php?

970


How is it possible to propagate a session id?

937