This is saying the pages would be under the pages folder and the link would be
index.php?page=FILE
file is the name of the file in the page you want to display.
Staff would be your default page if you didnt do index.php?page=
as it says &page= "staff";
PHP Code:
<?php
if ($_GET['page']) { $page = "staff"; } else { $page = $_GET['page']; }
include ("pages/$page.php");
?>
or
PHP Code:
<?php
$page = $_GET['page'];
if (!$page) {
$page = "staff";
} else {
$page = str_replace(":", "", $page);
$page = str_replace( "/", "", $page);
$page = str_replace( ".", "", $page);
$page = str_replace( "http", "", $page);
$page = str_replace( "www", "", $page);
}
include ($page .".php");
?>
or
PHP Code:
<?php
if (!$_GET['page']) {
$page = "staff";
} else {
$page = $_GET['page'];
}
include ($page .".php");
?>
ps nedren helped me with this long time ago this has to be right...