Source<!doctype>
<html>
<head>
<title><?php echo $title; ?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body>
<div id="header">
<h1>Your Website</h1>
<h2>catchy slogan...</h2>
</div>
<div id="navigation">
<ul>
<li><a href="index.php?chapter=9&script=9.8">Home Page</a></li>
<li><a href="index.php?chapter=9&script=9.5">Register</a></li>
<li><a href="index.php?chapter=9&script=9.6">View Users</a></li>
<li><a href="index.php?chapter=9&script=9.7">Change Password</a></li>
<?php // Create a login/logout link:
if (!isset($_SESSION['user_id'])) {
echo '<li><a href="index.php?chapter=12&script=12.8&path=using+sessions">Login</a></li>';
} else {
echo '<li><a href="index.php?chapter=12&script=12.11&path=using+sessions">Logout</a></li>';
}
?>
</ul>
</div>
<!-- chapter 12.10 sessions header.php -->
<!-- Start of the page-specific content. -->