I'm working on a website which allows artists to upload scans of their work into an online gallery.
I have created an HTML form where they enter details of their work, title, size, media etc which has a file field for the image.
Some of the text fields are "required" with a PHP script to check if they have entered data. All works well if they get everything right first time. The picture uploads correctly to a directory on the server.
If they make a mistake in one of the text fields, I have the form redraw, using the existing variables to populate the fields in the form so the user does not have to enter all of the data again.
However this technique does not work for the file field. To avoid the user having to select a file again, I tried storing $file, $file_name, and $file_size as hidden fields. But when the script tries to upload the file to the server I get an error message saying that the tmp file cannot be found.
Has anyone found a way round this problem?
Any help would be most grtaefully received!