Page 1 of 1

[SOLVED] Logout system

Posted: Sun Mar 28, 2004 7:35 pm
by S_henry
I have a very big problem. That is about to logout the system. The problem is everytime I logout the system, I must close the browser (IE) and re-open it again to login back into the system. If not, the global session variable still hold the value of username from login before. I also have tried to point to another page to logout with put 'session_unset()' to that page. But that's still not work. Anybody can help me pls??

Posted: Sun Mar 28, 2004 7:41 pm
by Illusionist
try [php_man]session_destroy()[/php_man]

Posted: Sun Mar 28, 2004 8:57 pm
by Deemo
just a tip with session_destroy() , people screw up on this all the time, make sure to include a session_start() before the session_destroy() or you will get and error ;)

Posted: Mon Mar 29, 2004 7:27 pm
by S_henry
Problem solved. Actually I just have to put session_start(). Thanks guys..

Posted: Tue Mar 30, 2004 8:56 am
by vigge89
S_henry wrote:Problem solved. Actually I just have to put session_start(). Thanks guys..
No session_destroy()?
Include a session_destroy(), or you will maybe get some problems...