Web Development Network  |  Sites:    Capital Tutorials    Internet Marketing Books    Arcade Games
Depiction- Webmaster Resources
Stock Image

Contributors: SSD VPS in Europe  |  SEO Las Vegas |  EsqRank |  Free SEO Report

Dental SEO Marketing  |  Best Las Vegas SEO Company  |  Currency Converter Live

Misc Links: Submit Tutorials (Earn $$) l Advertising l Privacy Policy | Site Map

Tutorials > PHP > Navigation


Learn how to make pages with ids.

In order to use this, you will need to rename your main page to whatever you'd like(ex. index2.php). Make sure to place the file name of your renamed index page where it says: include('themainpage.html'); You will put the code by itself in a new page(ex. index.php). I think its best just to use a php extension for all your pages. It's alot easier.

Don't forget to remove the comments next to the code before you use it.

switch($id) {
include('index.html');   <-- the url to your main page
break; case "page1":   <-- link id, the "title" what ever you wanna call it
include('page1.html');   <--- the link id page file, the file it will go to
break; case "page2":
break; case "page3":
break; case "page4":
break; case "page5":

To use this customize the names, such as page 1,2,3,4,5,6, and so on, and the url that they go to, they dont have to be .html files, but the file that this code is in must be PHP.

To use this code for your navigation all you links are going to look like this: filethatcodeisin.php?id=page and it will actually take you to the page which you specified above.

Note: You MUST duplicate lines of the code to have new urls.



i digitalemotion Photoshop Tutorials
Tutorial Man Wallpaper Stock  More