I am really just getting to grips with php and mysql, and have a problem with a html form and php script which, apart from other details, uploads an image if required. I have got that working to my satisfaction. I also want to give the capability of editing the information. But if there is no change to the image, I want to leave that field blank. Trouble is, either an invalid file is reported, or it removes the image filename from the database when that field is left blank. I have found that if I load the file again, I can cause the script to ignore it if it already exists, so I could leave it at that, but I would rather leave the field blank.
I have spent ages on trying to figure this out. I have totally mucked up my php script that uploads the file, and I am completely confused. I have found (through Google) that the $_FILES array always returns TRUE, so how is it possible to find out if an image has been specified (or more importantly, if it has not!).