Forum Moderators: coopster
I have a simple logout feature on a site I am building which appends "?action=out" to a url string. Once $_GET['action'] equals "out", I run a script which tries to kill the user session. This works some of the time.
I have been using the following to empty the username session, which if empty, means the user is not logged in:
unset($_SESSION['username']);
$_SESSION['username'] = "";
This seems to be not enough. I am looking to completely empty all $_SESSION variables at that given point when the "action = out" value is found, as $_SESSION['username'] is not the only variable.
Can you please help. Thanks in advance.