I've created the login page which works correctly. The login page redirects the user back to index.php once they are logged in.
However, none of the menu links work now in the index.php page. The links that were showing when I wasn't logged in are working, but the ones showing after I've logged in are not.
Here's my footer.html page showing the links.
</div>
<div id="Menu">
<a href="../index.php">Home</a><br />
<?php # footer.html
// This page completes the HTML teplate.
//Display links based upon the login status.
//Show login links if this is the logout page.
if (isset($_SESSION['user_id']) AND (substr($_SERVER['PHP_SELF'], -10) != 'logout.php'))
{
echo '<a href="logout.php">Logout </a><br />
<a href="change_password.php">Change Password</a><br />';
}
else
{
//Not logged in.
echo '<a href="register.php">Register</a><br />
<a href="login.php">Login</a><br />
<a href="forgot_password.php">Forgot Password</a><br />';
}
?>
</div>
</body>
</html>
<?php
//Flush the buffered output
ob_end_flush();
?>
I don't know what other code I should include?