Below is the PHP code that I have at the top of the pages in question. All it is supposed to do is verify that the user is logged in, and then show the page if they are.
<!DOCTYPE html>
<html lang="en">
<?php
require_once 'classes/Membership.php';
$membership = New Membership();
$membership->confirm_Member();
?>
<head>
Membership.php has the following code:
<?php
require 'Mysql.php';
class Membership {
function validate_user($un, $pwd) {
$mysql = New Mysql();
$ensure_credentials = $mysql->verify_Username_and_Pass($un, md5($pwd));
if($ensure_credentials) {
$_SESSION['status'] = 'authorized';
header("location: index.php");
} else return "Please enter a correct username and password";
}
function log_User_Out() {
if(isset($_SESSION['status'])) {
unset($_SESSION['status']);
if(isset($_COOKIE[session_name()]))
setcookie(session_name(), '', time() - 1000);
session_destroy();
}
}
function confirm_Member() {
session_start();
if($_SESSION['status'] !='authorized') header("location: login.php");
}
}
Mysql.php has the following code:
<?php
require 'Mysql.php';
class Membership {
function validate_user($un, $pwd) {
$mysql = New Mysql();
$ensure_credentials = $mysql->verify_Username_and_Pass($un, md5($pwd));
if($ensure_credentials) {
$_SESSION['status'] = 'authorized';
header("location: index.php");
} else return "Please enter a correct username and password";
}
function log_User_Out() {
if(isset($_SESSION['status'])) {
unset($_SESSION['status']);
if(isset($_COOKIE[session_name()]))
setcookie(session_name(), '', time() - 1000);
session_destroy();
}
}
function confirm_Member() {
session_start();
if($_SESSION['status'] !='authorized') header("location: login.php");
}
}
The CSS that affects the general layout of the pages is this:
.main { margin-top: 25px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
width: 960px; }
.bg1 { background:url(../images/bg_menu.png) 0 0 repeat-x }
On the pages that do not require the user to login, the top margin is 25px...however, on the pages that do require the user to be logged in, it is more like 50px.
I posted pictures of the top margin/menu bar in my first post, but will add them again here so you don't have to scroll back to find them.
Hope this is the information you need to help as this is really starting to drive me nuts. I know it's only a visual thing, and something that most people probably wouldn't notice, but my OCD has kicked in and it is annoying the heck out of me because it doesn't line up as it should be.