When I am going to upload a file, my $_POST variable knows the file name, but the $_FILES variable is null. I've used this code before, so I'm really stumped.
Here's what I'm using for input:
<label for="importFile">Attach Resume:</label>
<input type="hidden" name="MAX_FILE_SIZE" value="10000000">
<input type="file" name="importFile" id="importFile" class="validate['required']">
And for processing:
$uploaddir = "E:/Sites/OPL/2008/assets/apps/newjobs/resumes/";
$uploadfile = $uploaddir . time() . '-' . urlencode(basename($_FILES['importFile']['name']));
if (!move_uploaded_file($_FILES['importFile']['tmp_name'], $uploadfile)) {
echo 'Error uploading file. Error number: ' . $_FILES['importFile']['error'];
var_dump($_FILES['importFile']);
echo $_POST['importFile'];
die();
}
Which is giving me this result:
Error uploading file. Error number: NULL
Maintaining The OPL Website.doc
Any help would be greatly appreciated.