- Enable PHP error reporting in order to see the error message from
move_uploaded_file()
that explains the problem. - Check the
$_FILES['image']['error']
variable.
In your case it’s a wrong filename. The file will be stored in a temporary location, so use tmp_name
instead of name
:
move_uploaded_file($_FILES['image']['tmp_name'], __DIR__.'/../../uploads/'. $_FILES["image"]['name']);
// echo "Uploaded";