I have a php script that creates a page when given a new entry and in that page, after the page is made i try to set a variable in the session to be the string of the page name just created like this.
$_SESSION['newpage'] = $html_file_name;
when the script is done, it redirects back to the insertion form page with this
<meta http-equiv="Refresh" content="0; url=http://www.whatever.com/insert.php...
on that page I had planned to create a link the the page just created like this
<a href="<?$_SESSION['newpage']?>"> last page created </a>
also just to let you know, i echoed $_SESSION['newpage'] just before the redirect on the previous page to make sure it got the value of the new page and it did, which is something like "jap-25.php"

however after the redirect when i try to use this line to make a link to the newly created page...
<a href="<?$_SESSION['newpage']?>"> last page created </a>
somehow the $_SESSION['newpage'] has taken the value of the pagename i am using it on. "insert.php" though this $_SESSION['newpage'] is not used ANYWHERE else on that page, and like i said, one line above the redirect on the prev page it was the correct value. I DO have session_start(); on both pages. I dont know how the @$##@ it could have possible gotten this value and its making me pretty POed. I will love you forever if you tell me whats wrong.

also if it matters, before i was getting blank '' no value on the second page, and without me changing anything it turned to the "insert.php" randomly and is now staying that way.
tried using the php header to redirect instead, also tried just making an href to click on to get back instead of redirect, no difference.