Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Php Navigation, Made by me
Lewisthemusician
post Sep 25 2007, 06:52 PM
Post #1


Member [ Level 2 ]
Group Icon

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!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Gimp Animation Tutorial(1)
  2. The Worst Singer That Made It Big(6)
  3. Basic Html Tutorial(1)
  4. Barebone Kit Completion- Need Second Opinions(3)
  5. Pre Loader Tutorial For Flash(6)
  6. What Made You Switch To Linux?(60)
  7. Do You Program/code Your Own Games(11)
  8. Like My New Banner?(8)
  9. Just Made This Cd Cover For A Friend(3)
  10. Banner Made For A Friend(9)
  11. C++ Meters To Feet And Feet To Meters Program(0)
  12. New Wordpress Navigation Plugin(0)
  13. Attack Script In Php(5)
  14. Website Navigation Hover Buttons Stick So Made Css Today(7)
  15. Login Made Easy(0)
  1. Character Modeling For 3ds Max(4)
  2. Which Os Would Be First To Respond With ....(4)
  3. My Sigs(5)
  4. Php Starter Guide(3)
  5. World Of Warcraft: Best MMORPG Ever(74)
  6. Installing Mysql?(17)
  7. Warning: Made In China(11)
  8. Starburst(1)
  9. Rose Server Setup Guide Made Simple(2)
  10. Games Your Glad Were Never Made...(10)
  11. Wallpaper Collection (My Work)(9)
  12. Photoshop Tutorial: Cutting Out A Psd(3)
  13. Sig I Made(5)
  14. Blood Made Of Plastic(11)
  15. Blending Made Easy! [photoshop Tutorial](2)


 



- Lo-Fi Version Time is now: 11th October 2008 - 06:50 AM