what happens to uploaded files after navigation away from a page in php?
<p>I have a form page that posts to another page where multiple fields as well as file uploads are processed.  Just wondering what happens to the 'tmp_name' files when/if the user enters some incorrect info and I send them back to the form page with a meta refesh?</p>

<p>If successful, I move the file to a new location. But if not successful, do the files get unset or erased if the user gets redirected?  If they don't, can I reaccess them again so the user doesnt have to reupload?  OTOH if there is a problem with the file, say it is not the expected MIME type, should I unlink($_FILES['userFile']['tmp_name']?  Its easy to force the user to re-upload again, i think, but I dont want the server being filled up with files that will never be used?  If the form passes inspection, and I use rename() to move the file, is the temp file really gone?  Did it ever exist on the server's hard drive, or was it only in RAM? Whats the best practice here?</p>
