jjmusicpro Posted June 8, 2008 Share Posted June 8, 2008 ok this is weird... I created 2 session variables, i post to the page, it says im logged in displays the values of those session objects, then i wanted to click a link, and on that page, show me the value of that session object, however it says its blank. $a ="yes"; $b="yes"; $_SESSION['loggedin']=$a; $_SESSION['accesstype']=$b; on page 2 i say echo $_SESSION['loggedin']; and it doent display anything, but if i put that same code on the page the session object was created on, it will show the value as "yes" like it should. Link to comment https://forums.phpfreaks.com/topic/109204-solved-session-variable/ Share on other sites More sharing options...
pocobueno1388 Posted June 8, 2008 Share Posted June 8, 2008 Are you calling session_start() at the top of both scripts? Link to comment https://forums.phpfreaks.com/topic/109204-solved-session-variable/#findComment-560199 Share on other sites More sharing options...
DarkWater Posted June 8, 2008 Share Posted June 8, 2008 You need session_start() at the top of each page. Edit: Damn, beaten. =( Link to comment https://forums.phpfreaks.com/topic/109204-solved-session-variable/#findComment-560200 Share on other sites More sharing options...
jjmusicpro Posted June 8, 2008 Author Share Posted June 8, 2008 OMG I LOVE YOU! IT WORKED! THanks again PHPFREAK 4 LIFE! :-X Link to comment https://forums.phpfreaks.com/topic/109204-solved-session-variable/#findComment-560208 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.