Scott Fletcher wrote:

"[-^-!-%-" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>.
..

Hello all,

I need some clarification. To my understanding, each visit to php site
creates a UNIQUE Session ID (SID).
Only when you call session_start() - this function checks for $_REQUEST[session_name()], if
there is one, it is used, else it creates one.

And, that ID stays constants until the
browser is shutdown, or the session is specifically destroyed.
Is this correct? If not, then please advise.

Basicly yes, session cookie lifetime is controled by session_lifetime configuration directive,
its default 0 means cookie is destroyed after the browser closes.

I'm trying to develop a cookie-less, persistent, shopping cart, which
saves the cart details, in a database. I need to associate each order
(cart item) to the current session id. However, the session ID number,
seems to change, everytime the page is reloaded. Is this how it works?
Am i missing something?

Session ID is stored as a cookie, or you have to pass SID constant in each
link of your page that points to your site and also as a hidden field in
forms.

Please advise.

Thanks.

-john





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to