Page 1 of 1

footer not showing up on index, but on everything else

Posted: Thu Jan 08, 2004 7:02 pm
by CraniumDesigns
http://craniumdesigns.com/christian/index.php

Code: Select all

<?php
ob_start(); // turn output buffering on 
session_start();
header("Cache-control: private"); // IE 6 Fix

include 'header.php';

/* Check User Script */

// Convert to simple variables
$username = $_POST['username'];
$password = $_POST['password'];

if((!$username) || (!$password)){
	echo "Please enter ALL of the information! <br />";
	include 'login_form.html';
	exit();
}

// Convert password to md5 hash
$password = md5($password);

// check if the user info validates the db
$sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' AND activated='1'");
$login_check = mysql_num_rows($sql);

if($login_check > 0){
	while($row = mysql_fetch_array($sql)){
	foreach( $row AS $key => $val ){
		$$key = stripslashes( $val );
	}
		// Register some session variables!
		session_register('my_username');
		$_SESSION['my_username'] = $username;
		session_register('first_name');
		$_SESSION['first_name'] = $first_name;
		session_register('email_address');
		$_SESSION['email_address'] = $email_address;
		
		mysql_query("UPDATE users SET last_login=now() WHERE username='$username'");
		
		header("Location: profile.php?username=$username");
		include 'output_flush.php'; 
	}
} else {
	echo "You could not be logged in! Either the username and password do not match or you have not validated your membership!<br />Please try again!<br />";
	include 'login_form.html';
}

include 'footer.php';

?>

why is the footer not showing up on the index page, but is on every other page?
?>

Posted: Thu Jan 08, 2004 7:27 pm
by JAM

Code: Select all

} // missing
    include 'footer.php';