when session_start() is called for a first time, it generates session_id and set a 
cookie for the browser. The common name for the
cookie is PHPSESSID. You receive it on the refresh, because after the first load this 
cookie is known by the browser. When you hit
the page for a first time, there is no set PHPSESSID cookie, so PHP WILL NOT have 
$GLOBALS['PHPSESSID'] variable (assuming
register_globals is on in php.ini).
If you want the id. Get it from session_id().

HTH

Regards,
Andrey Hristov
----- Original Message -----
From: "Ryan Kelley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 09, 2002 4:02 PM
Subject: [PHP] Sessions don't load


> I have got a page that i am loading sessions on with the following code:
>
> session_start();
> $HTTP_SESSION_VARS['sess_id']=$PHPSESSID;
>
> Except that it will not assign an actual value until i hit refresh on my
> browser. Any ideas for a fix?
>
> Thanks in advance,
>
> Ryan Kelley
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to