Exercises from the book
PHP and MySQL for Dynamic Web Sites
by
Submitted by Ashlie Taylor 2013
<!-- Start of Footer --> </div><!-- Content --> <div id="menu"> <a href="index.php?script=18.5&chapter=18" title="Home Page">Home</a><br /> <?php # Script 18.2 - footer.html // This page completes the HTML template. // Display links based upon the login status: if (isset($_SESSION['user_id'])) { echo '<a href="index.php?chapter=18&script=18.9" title="Logout">Logout</a><br /> <a href="index.php?chapter=18&script=18.12" title="Member\'s Area">Member\'s Only</a><br /> <a href="index.php?chapter=18&script=18.11" title="Change Your Password">Change Password</a><br /> <a href="index.php?chapter=18&script=18.16" title="Edit Your Profile">Change Profile</a><br /> '; // Add links if the user is an administrator: if (in_array($_SESSION['user_level'], array(1,2))) { echo '<a href="index.php?chapter=18&script=18.13" title="Manage Users">Manage Users</a><br />'; } } else { // Not logged in. echo '<a href="index.php?chapter=18&script=18.6" title="Register for the Site">Register</a><br /> <a href="index.php?chapter=18&script=18.8" title="Login">Login</a><br /> <a href="index.php?chapter=18&script=18.10" title="Forgot Password">Forgot Password</a><br /> '; } ?> </div><!-- Menu --> <div id="footer">© 2014 Ashlie Taylor</div> </div> <!-- Registration --> <?php // Flush the buffered output. ob_end_flush(); ?>