|
|
|
|
![]() ![]() |
Sep 25 2007, 06:52 PM
Post
#1
|
|
|
Member [ Level 2 ] Group: Members Posts: 51 Joined: 5-January 07 Member No.: 19,160 |
Step 1: Make a file, in this case we have named it navigation.php
Step 2: Enter the code below. I have added in comments for some help, but still please read the part below to find out more about this script and what you should change in it to integrate it to your site. CODE <?php $name = "Simple PHP Navigation"; //The name of the page $site = "<center><b><u>$name</b></u></center> //A Little Title For Each Page <br />"; $filename = "navigation.php"; //Change this to whatever your filename is if ($_GET['page'] == 'page1') { //This is page 1 data echo " $site This is page 1 <br /> <br /> <a href="$filename">Go Back!</a>"; }elseif ($_GET['page'] == 'page2') { //This is page 2 data echo " $site This is page 2 <br /> <br /> <a href="$filename">Go Back!</a>"; }elseif ($_GET['page'] == 'page3') { //This is page 3 data echo " $site This is page 3 <br /> <br /> <a href="$filename">Go Back!</a>"; }else { //below is the navigation and home page echo " <center> <title>$name</title> Welcome to $name, this is a simple PHP Navigation for everyone to use created by Lewis Brand.<br /> <b><u>Navigation</b></u><br /> <a href="$filename?page=page1">page1</a><br /> <a href="$filename?page=page2">page2</a><br /> <a href="$filename?page=page3">page3</a><br /> "; } ?> Step 3: Edit some parts of it, you might want to change the $name variable to your site name. Change $filename to the name of the file you have put this code in. Step 4: To edit the pages where it has CODE }elseif ($_GET[page] == 'pagename') { Just edit the pagename text to the name of the page you want. Step 5: To edit the navigation, this is placed at the bottom of the script which is the home page. CODE <a href="$filename?page=pagename">pagename</a><br /> Just edit the parts which say pagename to what you want your page name to be. That's all. Enjoy! |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 11th October 2008 - 06:50 AM |