Xyphon Posted December 13, 2007 Share Posted December 13, 2007 On my logout.php, it for some reason does not display bottom, while every other page does. <?PHP include('Connect.php'); include('top.php'); $usercheck = addslashes($_POST['username']); $passcheck = md5(addslashes($_POST['password'])); $Result1 = mysql_query("SELECT * FROM users WHERE username='$usercheck' AND password='$passcheck'"); $Rows1 = mysql_fetch_array($Result1); $UserID = $Rows1['ID']; /* if logged in */ if (isset($_COOKIE['UserID'])) { setcookie("UserID", "$UserID", time() - 9999999); echo "You are now logged out, go to <a href='index.php'> Home</a> to log back in."; exit; } /* if logged out */ if (!isset($_COOKIE['UserID'])) { echo "Sorry, you are already logged out. Click <a href='index.php'>Here</a> to go back."; include("bottom.php"); exit; } ?> Whats wrong? Link to comment https://forums.phpfreaks.com/topic/81448-another-layout-problem/ Share on other sites More sharing options...
Northern Flame Posted December 13, 2007 Share Posted December 13, 2007 try this.... <?PHP include('Connect.php'); include('top.php'); $usercheck = addslashes($_POST['username']); $passcheck = md5(addslashes($_POST['password'])); $Result1 = mysql_query("SELECT * FROM users WHERE username='$usercheck' AND password='$passcheck'"); $Rows1 = mysql_fetch_array($Result1); $UserID = $Rows1['ID']; /* if logged in */ if (isset($_COOKIE['UserID'])) { setcookie("UserID", "$UserID", time() - 9999999); echo "You are now logged out, go to <a href='index.php'> Home</a> to log back in."; exit; } else{ /* if logged out */ echo "Sorry, you are already logged out. Click <a href='index.php'>Here</a> to go back."; include("bottom.php"); exit; } ?> Link to comment https://forums.phpfreaks.com/topic/81448-another-layout-problem/#findComment-413485 Share on other sites More sharing options...
Xyphon Posted December 13, 2007 Author Share Posted December 13, 2007 I did that, and it works. Also, If I log out, them I go to /logout.php again, it displays the 'You are now logged out page'. Help? Link to comment https://forums.phpfreaks.com/topic/81448-another-layout-problem/#findComment-414222 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.