I don't use cookies when I use sessions.. Saves hassles Regards Chris Kay
> -----Original Message----- > From: Erwin [mailto:erwin@;isiz.com] > Sent: Monday, 4 November 2002 6:50 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: Session cookies > > > > When the user logs in , i create a session with session varialbles, > > the session cookie is saved on clients computer. > > > > When i log off i say > > > > session_unset(); > > session_destroy(); > > setcookie(session_name()); > > > > The session in the tmp is deleted , but the cookie is still > there , i > > know this because when i login , the same session id is > used ! Why is > > that ? > > Because you use the same session to connect from client to > server. You don't close your browser, don't wait 20 minutes > (or something like that), so the webserver knows you are the > same. The session between the client and server is not yet gone. > > It's also possible that you need to set your cookie in the > past. You're just setting a cookie with > setcookie(session_name()). If you want it destroyed, set it > some time ago, like setcookie(session_name(),-3600). > > > > The session id changes when you close the browser , as the > default is > > 0. > > Not because default is 0, but because there isn't any session yet. > > HTH > Erwin > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php