Knowledge is Power
'index.php', 'About' => '#', 'Contact' => '#', 'Register' => 'register.php' ); // The page being viewed: $this_page = basename($_SERVER['PHP_SELF']); // Create each menu item: foreach ($pages as $k => $v) { // Start the item: echo '
' . $k . '
'; } // End of FOREACH loop. // Show the user options: if (isset($_SESSION['user_id'])) { // Show basic user options: // Includes references to some bonus material discussed in Part Four! echo '
Account
Logout
Renew
Change Password
Favorites
Recommendations
'; // Show admin options, if appropriate: if (isset($_SESSION['user_admin'])) { echo '
Admin
Add Page
Add PDF
Something else here
'; } } // user_id not set. ?>
Content
' . htmlspecialchars($category) . ' '; } ?>
PDF Guides