Copy current .php page with Values
Posted: Tue Nov 05, 2002 6:11 pm
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 in a temp directory so the user can view their personal page at a later date. Problem is when I open the copied file all the previously input values are missing of course and replaced with default ones. So my question is what is the best way for me to make a copy of the current page, 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/mydomain/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. Hope somebody can
point me in the right direction. Thanks
<?php copy("/home/mydomain/public_html/$PHP_SELF", "/home/mydomain/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. Hope somebody can