Hi Guys,
I got an error- when i click on logout button, it keeps showing log in. No actual logout happen.. Did i miss/incorrect anything in above code
Here is my bit code written in php
// User authentication
if($hduser['logged_in'] && empty($HTTP_GET_VARS))
{
// If user logged in, show message & redirect to index
die(dialog("You are already logged in.",
$page_title, "Index", "index.php", true, true));
}
//
// User logs out ----------------------------------------------------------------------------------------------------
//
if($_GET['action'] == "logout")
{
//
// Check if user logged in, if not show error
//
if(!$hduser['logged_in'])
{
die(dialog("You are not logged in.", $page_title, "Index", "index.php", true, true));
}
else
{
setcookie("hd_userdata", "", time()-36000);
die(dialog("You are now logged out.", $page_title, "Log In", "login.php", true, true));
}
}
#
Thanks in advance :-\ :-\