> 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

Reply via email to