View Full Version : logout destroy session

03-26-2009, 05:49 PM

I am having some trouble ending/destroying a session I have tried using the following but I can still press that back button and I'm still logged in.


also unset, and destroy.

Any ideas how to destory the session so I can't press the back button and get back in.

Thanks in advance

03-26-2009, 05:54 PM
i think you need session_start() before you call session_destroy() so it knows which one you want to kill

03-27-2009, 05:24 AM
session_start() is what starts a session. There are ways around this but generally this will need to be at the top of each page. To destroy a session simply call session_destroy(). That will get rid of your session and eliminate all session variables as well.