I have a fairly simple form on my site. Just a text input and a file input.
<form action='myFile.php' method='POST'>
<input type='text' id='image_description' name='image_description'>
<input type='file' id='image' name='image'>
<button onclick="this.form.submit();">Submit</button>
</form>
When I submit I have var_dump($_POST)
and var_dump($_FILES)
.
I can see everything I entered in the text fields but the file does not seem to be coming through.
array(2) {
["image_description"]=> string(4) "test"
["image"]=> string(14) "Untitled-1.png"
}
array(0) {
}
This is happening both locally on WAMP and on my shared hosting domain.
Any ideas or possible reasons this could be happening or how to resolve it would be greatly appreciated.