Php Image Upload Problems
I'm trying to create a website were pictures can be uploaded and saved into a folder in the server. However, the code does not go past the second if. Is there something I'm missing
Solution 1:
Looks like you've missed input file name
in your condition:
if (isset($_FILES["image"]["name"])){
Solution 2:
In the manual there's a section on file uploads http://php.net/manual/en/features.file-upload.php which shows the values for the error variable in the $_FILES
array.
A successful upload should result in the error value being UPLOAD_ERR_OK
.
So change the second if
condition to:
if($_FILES['image']['error']=='UPLOAD_ERR_OK'){
Post a Comment for "Php Image Upload Problems"