In the div you will have your content in, insert the following PHP code:
Create a page called main.php and insert all you default introduction text which will be shown if a page isn't selected.PHP Code:<?php
$page = $_GET['p'];
if(!isset($page))
{
include("main.php");
}
elseif(file_exists("". $page . ".php"))
{
include("" . $page . ".php");
}
else
{
print("The page <b>" . $page . ".php</b> does not exist.");
}
?>
You're links will look like:
And so on.Code:<a href="index.php?p=about">About</a> <a href="index.php?p=news">News</a> <a href="index.php?p=staff">Staff</a>
(Create an .php file for each one though with the content within it).
For an customized error page you would replace
withPHP Code:print("The page <b>" . $page . ".php</b> does not exist.");
with the exist.php file contained your customized error page to be shownPHP Code:include("exist.php");
.






.

Reply With Quote



.
