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 the importance of php?

928


Write a program to get second highest number in an array using php?

962


What is the method to register a variable into a session?

815


How to avoid the undefined index error?

954


Is facebook still written in php?

936


How to process the uploaded files?

1066


How to set a value in session? How to remove data from a session?

944


Which php framework is fastest?

948


Why is used in php?

927


What is a static variable in php?

1007


How do you call a constructor for a parent class?

857


Explain the types of string comparision function in PHP

907


Tell me what is mean by an associative array?

1014


Which methods should be used for sending an email using the variables $to, $subject, and $body?

1055


How to check whether a number is prime or not?

986