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. Quote Link to comment 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? Quote Link to comment 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. =( Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.