dprichard Posted May 28, 2008 Share Posted May 28, 2008 Okay, I was working on a login script and having tons of issues so I made a small script to test sessions and if I echo the session out on the page I am on it works, but if I try to pass it from one page to another it doesn't. I am lost as to what may be causing this. Any help would be greatly appreciated. Here is what I am using to test it with. test1.php <?php session_start(); $_SESSION['UID'] = 'Test'; echo '<a href="test2.php">link</a>'; ?> test2.php <?php session_start(); echo $_SESSION['test']; ?> When I get to test two I get the following error. Notice: Undefined index: test on line 3 Link to comment https://forums.phpfreaks.com/topic/107609-session-works-in-same-page-but-wont-pass-from-page-to-page/ Share on other sites More sharing options...
trq Posted May 28, 2008 Share Posted May 28, 2008 test2.php <?php session_start(); echo $_SESSION['UID']; ?> Link to comment https://forums.phpfreaks.com/topic/107609-session-works-in-same-page-but-wont-pass-from-page-to-page/#findComment-551541 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.