Hi all,
I have a PHP file that contains a form. One of the form elements is of type file, to allow users to upload a file to the site. The code to do this is:
<input type='hidden' name='MAX_FILE_SIZE' value='150000'>Upload picture</td><td><input size=60 name='PictureFile' type='file'>
The form is a POST one and I use $PHP_SELF, so it is the same PHP file that is called on submit. Now, when I check for the file's existence this way:
if ($_FILES['PictureFile']['name'] == "") ...
I get a PHP warning stating:
Notice: Undefined index: PictureFile in material_maintenance.php on line 63
I have used the exact same method in other files and it works fine. I've double checked the syntax and even copied and pasted the lines from a working version, but I can't get around the error and have no idea what's wrong.... Can anyone see anything I might have missed or has any suggestion?
Many thanks