freakymitra Posted January 10, 2011 Share Posted January 10, 2011 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 :-\ :-\ Link to comment https://forums.phpfreaks.com/topic/223963-log-out-error-please-help/ Share on other sites More sharing options...
Pikachu2000 Posted January 10, 2011 Share Posted January 10, 2011 What is the actual message that is displayed? $HTTP_GET_VARS has been deprecated since PHP 4.1.0, BTW. Link to comment https://forums.phpfreaks.com/topic/223963-log-out-error-please-help/#findComment-1157395 Share on other sites More sharing options...
freakymitra Posted January 14, 2011 Author Share Posted January 14, 2011 No error is displaying. it just keep me login even if open the page in new window or clear the page cache.. Thanks for reply Link to comment https://forums.phpfreaks.com/topic/223963-log-out-error-please-help/#findComment-1159324 Share on other sites More sharing options...
revraz Posted January 14, 2011 Share Posted January 14, 2011 Where are you checking to see if they are logged in? Link to comment https://forums.phpfreaks.com/topic/223963-log-out-error-please-help/#findComment-1159376 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.