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
What is the importance of php?
Write a program to get second highest number in an array using php?
What is the method to register a variable into a session?
How to avoid the undefined index error?
Is facebook still written in php?
How to process the uploaded files?
How to set a value in session? How to remove data from a session?
Which php framework is fastest?
Why is used in php?
What is a static variable in php?
How do you call a constructor for a parent class?
Explain the types of string comparision function in PHP
Tell me what is mean by an associative array?
Which methods should be used for sending an email using the variables $to, $subject, and $body?
How to check whether a number is prime or not?