The HTML:
<form action="formhandler.php" method="post" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit" name="submit" value="Submit" />
</form>
and doing a print_r($_FILES) in formhandler.php after choosing a file and clicking submit yields:
[file] => Array
(
[name] =>
[type] =>
[tmp_name] =>
[error] => 4
[size] => 0
)
And error code 4, according to the manual stands for "UPLOAD_ERR_NO_FILE - No file was uploaded" but I can't figure out why it wasn't uploaded.