Hello all,
In this tutorial you will be able to make a simple PHP navigation system that is easy to setup and requires no editing afterwards.
Steps:
1. Open index.php on your website, if it isnt .php change it.
2. Place in the following code:
3. Then make your pages, however they must all end in .php, also leave out your website template from all the pags except index.php because they will just be automaticaly included into the page. You will also access your pages by going: index.php?id=some_page
Then your done!
In this tutorial you will be able to make a simple PHP navigation system that is easy to setup and requires no editing afterwards.
Steps:
1. Open index.php on your website, if it isnt .php change it.
2. Place in the following code:
| Code: |
|
<?php $id = @$_GET['id']; if ($id == "" or $id == "index") { include("default.php"); // Default page } else { include($id.".php"); } ?> |
3. Then make your pages, however they must all end in .php, also leave out your website template from all the pags except index.php because they will just be automaticaly included into the page. You will also access your pages by going: index.php?id=some_page
Then your done!
