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 to upload files using PHP?

Answer Posted / sei thu htun

Here is example code:
On HTML:
<form enctype="multipart/form-data" action="uploader.php"
method="POST">
<input name="uploadedfile" type="file" />
<input type="submit" value="Upload File" />
</form>

On PHP Script:

$target_path="YOUR_TARGET_PATH_FOR_STORE_UPLOAD_FILE_ON_SERVER";

if(@move_uploaded_file($_FILES['uploadedfile']['tmp_name'],
$target_path)) {
echo "Success";
} else{
echo "Error";
}

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between put and post method in http?

970


Explain about require and include function?

935


What is "print" in php?

900


What is basename php?

908


Is php a low level language?

922


What does the expression exception::__tostring means?

958


How can you get the size of an image in PHP?

955


What is str_replace()?

961


Can php run on windows server?

960


Is php secure?

920


What is the difference between overloading and overriding in php?

987


What happens when submit button is clicked?

885


Explain setcookie() function in php?

966


What are default session time and path?

1053


Tell me how to find the position of the first occurrence of a substring in a string?

914