Firs of all I think it would be easier to conult PHP Help before posting.
Quoting from PHP Help - function session_destroy():
"
[EMAIL PROTECTED] (18-Jan-2002 02:26)

When users log in and out of your site they will keep the original session
you have set for them.
if you need to have this change on each login then you should use the
setcookie function to remove the session id on each logout.
for instance:
//remove the local session
session_destroy();
//remove the client session
setcookie("SES_NAME","","","/");
//redirect user with header
header("somewhere");
exit;
"
Also from PHP Help:
"session_destroy() destroys all of the data associated with the current
session. It does not unset any of the global variables associated with the
session, or unset the session cookie."


"Torsten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> when I destroy my session and reload my index.php. I get the same
> session_id() that was just destroyed before. I've checked it after
> session_destroy() with echo session(); The function returned no value
> anymore. But as I said, when starting a new session the old session_id is
> reappearing. Only when I set off the cookie option in my browser
> session_start() gives a new session_id.
>
> I get really confused with it, because I thought that the session_id is
> generated by php (a remote machine in my case) and has nothing to do with
> the browser, exept I would actively set cookies. How can code it that way,
> that non-independend from the cookie settings in the browser I always can
be
> sure to have a really new session_id?
>
> Thank you,
> Torsten

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

Reply via email to