Just as I thought everything was looking just as it should with my add record / upload image page with all it's validation, I've just spotted an odd one - nothing crucial, just a bit odd looking.
I basically have this code to check if a file has already been uploaded :
if (file_exists("Photos/" . $_FILES["uploadFile"]["name"]))
{
$ValidationFailed = true;
$FTGvalid_file_errmsg = "This file has already been uploaded. If you are sure it's a new photo please rename it before uploading to the library.";
$ErrorList .= $FTGvalid_file_errmsg . '<br/>';
}
Which works just as it should if a file already uploaded is selected.
However, if no file is selected, I'm still getting the error message.
This isn't major, as a file does have to be uploaded - indeed there is also a check on file type, which flags any blanks anyway - but it's just a bit odd that the 'File is already uploaded' is coming up when no file is selected?
Can this be tweaked at all? I also tried changing the Null column back in mySQL to see if that was an issue, but it didn't seem to be.