dj-kenpo Posted July 26, 2007 Share Posted July 26, 2007 Hello, I'm trying to generate and then get the session id right away as I'd like to put it in a databse right away as well upon inital page view, but I clearly don't understand sessions as this is not working <? session_start(); $_SESSION['visitor']=session_id(); $visitor_session_id = session_id(); ?> this only works AFTER I refresh the page I need to get it right away though thanks Quote Link to comment Share on other sites More sharing options...
dj-kenpo Posted July 26, 2007 Author Share Posted July 26, 2007 this didn't work either if(!session_is_registered("visitor_session_id")){ $visitor_session_id=session_id(); session_register("visitor_session_id"); print "$visitor_session_id"; 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.