Jump to content

Archived

This topic is now archived and is closed to further replies.

simonsays

LOGOUT does not work

Recommended Posts

I have a little problem with logout in my script.
There is a small piece of code responsible for that.
[code]if ((isset($_GET['logout'])) && ($_GET['logout']==1)) {
        session_unset();
session_destroy();
}[/code]
And there is a link in the logged user interface with 'logout=1' in its URL.However, when I click this link, the user interface seems to stay. And it is only gone when I click it the second time. What might be the problem?
Thank you in advance!

Share this post


Link to post
Share on other sites
when you run those commands, it does not go into effect until the next time you run a script.  it will still be in effect for the rest of the script.  kinda like making a cookie.  you can't access it until after you go to some new page.  when i do a logout, i usually redirect to a new page, like the main page or something.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.