I have a dynamically created .php file containing user input text and an uploaded .jpg file, called newpage.php. I want to make a copy of this file with a unique id (that's the easy part) and save it to a temp directory (easy too) when the user clicks a button - this is so the user can view their personal page at a later date. Problem is when I open the copied file all the previoulsy input values are missing of course. So my question is what is the best way for me to make a copy, but to also send the global values as a permanent fixture in the new copy too. My copy line so far is
<?php copy("/home/mydomain/public_html/$PHP_SELF", "/home/fmydomain/public_html/temp_files/test.php"); ?>
The newpage.php is opened by a form method POST, with values such as firstname, lastname, picture.jpg. These are the values I'd like to send to the copy test.php but as static values