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
Tell me how can you pass a variable by reference?
Explain what is the difference between $var and $$var?
What is the use of php and mysql?
What is apache and php?
What is php destruct?
What is the use of mysql_real_escape_string in php?
Explain about looping in PHP?
What is inheritance in php? How many types of inheritance supports php?
What is super keyword in c++?
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?
What are the different errors in php?
How to create a public static method in PHP?
What are the difference between array_keys() and array_key_exists() in php?
What is stripslashes php?