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
How to swap two variables without using 3rd temp variable.
Write a program using while loop in php?
What is difference between include,require,include_once and require_once()?
Does php need html?
Explain me what is the use of header() function in php?
Can you use php and javascript together?
Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?
What does csrf token mean?
What is php7?
What is the best way to test the strpos() return value in php?
Hi this is amul jani here, i complied my graduation in B.com stream.. but as career i looking for PHP language.. to get shape my career. so is that possible to enter in IT world.. for me how much scope of develop my career in this field.. amul jani
How many records can be stored in mysql table?
How do you end php?
How do you connet mysql database with php?
What is difference between isset and empty in php?