Welcome to the tutorial, today you will learn how to create page=link link's
Code:
<?
class navi{ //the class
function page($page){ //name the function
if(empty($page)){ //if the link is empty
include 'index.php'; //include your default page
}
elseif(file_exists($page.'.php')){ //else if the file exists
include $page.'.php'; //include it
}
else{ //the file does not exist
echo 'That file does not exist!';
}
}
}
$nav = new navi; //new navi
$nav->page($_GET['page']); //get the page and write the function
?>
Here is the navigation script, I hope it's easy enough to read and understand with the comments.
Register @ Retire at 21 If you like this tutorial