bookmark - Php Navigation Made by me

Php Navigation - Made by me

 
 Discussion by Lewisthemusician with 0 Replies.
 Last Update: September 25, 2007, 6:52 pm
 
bookmark - Php Navigation Made by me  
    
free web hosting
 
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!

Tue Sep 25, 2007    Reply    New Discussion   


Quickly Post to Php Navigation Made by me w/o signup Share Info about Php Navigation Made by me using Facebook, Twitter etc. email your friend about Php Navigation Made by me Print
Reply / Comment Ask a Question? Share / Bookmark E-Mail a Friend Print

Js/php/mysql Timer   Js/php/mysql Timer (2) (6) Php Starter Guide Made By Me  Php Starter Guide Made By Me