Jump to content

get session_id() right away? not working...


dj-kenpo

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.