Jump to content

Another layout problem


Xyphon

Recommended Posts

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

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;
}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.