Jimmy99
12-02-2002, 04:16 PM
I'm working on a file upload routine. It uploads fine, except..
The form and the file handling exist within the same php script. I use the regular:
if (is_uploaded_file($_FILES['imgfile']['tmp_name']))
{
// validate and move
} else {
// present user with form, action='$_SERVER[php_self]'
}
Which works fine.
HOWEVER, if I hit F5 on my browser to refresh the page i would expect/like for it to show me the form again. This isn't the case, in fact it seems that IE resends the file and $_FILES gets filled again, thus never going back into the ELSE condition (unless I close the browser and go back).
I've confirmed this by deleting the uploaded file, then hitting F5 and it just appears again.
What's the solution here?
TIA
Jim
The form and the file handling exist within the same php script. I use the regular:
if (is_uploaded_file($_FILES['imgfile']['tmp_name']))
{
// validate and move
} else {
// present user with form, action='$_SERVER[php_self]'
}
Which works fine.
HOWEVER, if I hit F5 on my browser to refresh the page i would expect/like for it to show me the form again. This isn't the case, in fact it seems that IE resends the file and $_FILES gets filled again, thus never going back into the ELSE condition (unless I close the browser and go back).
I've confirmed this by deleting the uploaded file, then hitting F5 and it just appears again.
What's the solution here?
TIA
Jim
