simonsays Posted August 27, 2006 Share Posted August 27, 2006 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! Quote Link to comment Share on other sites More sharing options...
.josh Posted August 27, 2006 Share Posted August 27, 2006 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. Quote Link to comment Share on other sites More sharing options...
simonsays Posted August 27, 2006 Author Share Posted August 27, 2006 thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.