Lamez Posted May 19, 2007 Share Posted May 19, 2007 I have a login system and when I logout, I am still logged in! I do not know why. Here is the script that keeps user's from viewing unless they are logged in! <?php $username = $_COOKIE['loggedin']; if (!isset($_COOKIE['loggedin'])) die("You are not logged in, <a href=login.php>click here</a> to login."); echo "<u>Welcome <b>$username</b></u>"; ?> Here is the logout script <?php setcookie("loggedin",time()-(3600 * 24)); setcookie("$username"); ?> How am I able to fix this? -Thanks Lamez. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.