PDA

View Full Version : || PHP Navigation Tutorial ||



Dan Williamson
04-12-2005, 02:03 PM
Well a few people on my MSN etc have been asking me how to use PHP for a navigation.

So I thought, why not write a tutorial :)

So here goes, I will tell you how to make a basic but cool Navigation in PHP coding.

Firstly, we'll need to change index.html to index.php





<?php
switch($id) {
default:
include('index.phpl');
break; case "yourIDhere":
}
?>



This is a short one, just one link and replace yourIDhere with something like content.

And then it gives your page a funky ID

Now heres how to link to it.



<a href="yourpage.php?id="YourIDHere">Link Name.</a>


Hope this makes sense, it's just a newbie guide to PHP.

- Dan

Want to hide these adverts? Register an account for free!