Hi Please can someone help me
I have an HTML form with a file upload field on it, which works fine with a valid file.
If an invalid file is entered, I have validation code which flags an error, etc., only I don't want it to flag an error if the field is left blank (meaning the user chose not to upload a file).
The problem is, I can't find a way of distinguishing if the user input a blank string, or some other string which isn't a file, because $FILES is the same in both cases - $FILES['fieldname']['error'] is 4, $_FILES['fieldname']['size'] is 0 and name, tmp_name are blank.
Any ideas?
Thanks