Do $_FILES["file_name"]["tmp_name"]; get destroyed if the user goes to another php page?
I am trying to pass the tmp_name in a hidden form field to the actual submit function where the tmp_name is copied to the server.
So this is my flow:
User Submits forms -> User confirms submission (all $_POST are added to hidden fields) -> Once confirmed the data is submitted and the file is copy() to server
File uploads work like this:
$_FILESarray of the scriptSo yes, uploaded files are only available for a single script execution. If you need them later, move them to a more permanent location.
And do not pass that file location to the user, even through hidden form fields. That’s client-side data, which means the user can manipulate the data and possibly cause security breaches by pointing the file path somewhere he has no business.