log out function not killing session
Posted: Wed Mar 31, 2010 11:20 pm
ok so ive got the user loggd in....however when i use
attach it to an a tag:
and refer to it later on in the code by
it does not work correctly...the page at logout is set to go back to the login screen but if i hit the back button it allows the user back in instead of a "expired" or page cannot be displayed. can anyone assist me with this please! 
Code: Select all
function clearsessionscookies()
{
unset($_SESSION['auth']);
unset($_SESSION['logname']);
$_COOKIE[auth]=="0";
session_unset();
session_destroy();
}
Code: Select all
<a class=\"Logout\" href=\"index.php?action=logout\">
Code: Select all
if ( isset($_GET['action']) && 'logout'===$_GET['action'] ) {
clearsessionscookies();
}