It appears you have not yet registered with our community. To register please click here...


Creating Nav

This is a discussion on Creating Nav within the Coding Tutorials forums. Topic: Welcome to the tutorial, today you will learn how to create page=link link's Code: <? class navi{ //the ...


Reply
 
Postbit Seperator LinkBack Thread Tools Postbit Seperator Search this Thread Postbit Seperator Display Modes
Old 12-10-2006, 01:38 PM   #1 (permalink)
 
Status: Junior Member
Join Date: Dec 2006
Posts: 25
Trader Rating: (0)
Retire at 21 is on a distinguished road
TD$: 0.00
Donate
Default Creating Nav
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
Retire at 21 is offline   Reply With Quote
Table Bottom LeftTable BottomTable Bottom Right
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




Home | Site Map | Contact | Archive | Top

 

Copyright © 2007 - 2010 iTalkWebs Network

Search Engine Optimization by vBSEO 3.1.0