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 Link to comment https://forums.phpfreaks.com/topic/61788-get-session_id-right-away-not-working/ 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"; Link to comment https://forums.phpfreaks.com/topic/61788-get-session_id-right-away-not-working/#findComment-307674 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.