Php Navigation - How to make your navigation based on php
maddog39
Mar 12 2005, 08:46 PM
I have re-constructed my last PHP Navigation system and it works great. So I have it here for you guys. Here are the instructions.
INSTRUCTIONS: Open your main page for your site in your text editor and paste in the following code where the main content goes.
CODE
<?php error_reporting (E_ALL ^ E_NOTICE); if(!$page){ $page = $HTTP_GET_VARS['page']; } //You can change 'page' to whatever you want.
//Default Page if($page == "" or $page == "index"){ include("main.php"); //You can change 'main.php' to whatever you want. } //Secondary Pages if($page == "something") { //Change 'something to what you want. include("something.php"); //Change 'something.php' to the page your including. } if($page == "something") { include("something.php"); //^Follow Above^// } if($page == "something") { include("something.php"); //^Follow Above^// ?>
Also when your doing this, take any other content in the main content box and put it into another file, probably main.php since that is set default but you may change that. You can also add pages by adding another...
Then save the page to your server and make sure that all other pages of your site are plain text or just dont have the site template in them. Also make sure that your index page has an ending of '.php' or this will not work.
When changing the URLs your pages will now be accessed by 'index.php?page=something' but obiously change 'something' and the 'page' to page names you put in the php code. Got it?
Well thats about it and if you need any help just ask me.
I have re-constructed my last PHP Navigation system and it works great. So I have it here for you guys. Here are the instructions.
INSTRUCTIONS: Open your main page for your site in your text editor and paste in the following code where the main content goes.
CODE
<?php error_reporting (E_ALL ^ E_NOTICE); if(!$page){ $page = $HTTP_GET_VARS['page']; } //You can change 'page' to whatever you want.
//Default Page if($page == "" or $page == "index"){ include("main.php"); //You can change 'main.php' to whatever you want. } //Secondary Pages if($page == "something") { //Change 'something to what you want. include("something.php"); //Change 'something.php' to the page your including. } if($page == "something") { include("something.php"); //^Follow Above^// } if($page == "something") { include("something.php"); //^Follow Above^// ?>
Also when your doing this, take any other content in the main content box and put it into another file, probably main.php since that is set default but you may change that. You can also add pages by adding another...
Then save the page to your server and make sure that all other pages of your site are plain text or just dont have the site template in them. Also make sure that your index page has an ending of '.php' or this will not work.
When changing the URLs your pages will now be accessed by 'index.php?page=something' but obiously change 'something' and the 'page' to page names you put in the php code. Got it?
Well thats about it and if you need any help just ask me.
Or, you can just try the following:
CODE
<?php if(isset($_GET[page])){
include($_GET[page].".php");
} <!-- then put your html code here --> ?>
So, if the file requested on the "page" dosen't exists, it will just ignore it and outputs the default page or the main page (the one on the bottom of the script).
So, if the file requested on the "page" dosen't exists, it will just ignore it and outputs the default page or the main page (the one on the bottom of the script).
This tutorial will teach you how to make a navigation system using php. So instead of having your url to your affiliates page like this http://yourdomain.com/affiliates.htm it will be like this http://yourdomain.com/index.php?id=affiliates This is a better way than to use iframes, it is more efficient. So let's get started. We will start with this code here.
CODE
<?php switch ($HTTP_GET_VARS[id]) { //Default - case case 'content': default: include 'content.htm'; break;
The switch tells you that all of the content won't be in there at once. HTTP_GET_VARS tells it to get these when called. This first one is the default one seen when you first enter the page. [id] is the case, meaning that it will be index.php?id=whatever You can change that to whatever you would like. So if you were to change it to [content] then it would be index.php?content=whatever. Put whatever file name you would like after the include, that is the file that will show up in the content area. The next part of the code will be this.
CODE
//Resources - case case 'resources': include 'resources.htm'; break; //About Us - case case 'aboutus': include 'about.htm'; break;
This is the other pages you would like to be in your content area. These you have to call up which will be explained later. You won't be able to see these until you go to the link. Now to close the code put this in.
CODE
} ?>
There you have it. You now can access your pages using php. All you have to do is when you put the link type
CODE
<a href="index.php?id=whatever" ?>
This whatever will be replaced on whatever you put in where it says case 'aboutus':Make sure to save your page as .php if it is not already. I hope this tutorial has helped.
Instead of http://yourdomain.com/index.php?id=affiliates, you can do this instead: http://yourdomain.com/?id=affiliates. It looks neater. I actually prefer Karlo's method. With the switch method, you have to write out a line for every possibility, whereas if the include has the same name as the querystring value, you just need one line of code.
Hi everyone im sure you have heard of sites where they pay to look at adds well thats exactly what
im here to talk about it is very easy just have to spend some time on it ive made $468 in just
4 months but think about it thats with out paying anything and mostly by referring my friends!
it really is easy and it puts some extra cash in my pocket! its easy i'll tell you how to
do it just go to bux.to and click on the links to sign up your free account and then start
referring your friends family or anyone and click on the adds and all you have to do i....
First of all please note well that E17 is in beta fase, and can make your computer segfault (which
by contrary - WILL NOT ERASE YOUR DATA - your computer will be restored to the statein which it was
before it segfaulted), and if you don't want this to happen then don't install this!
Well, in this tutorial I will tell you how to install OpenGEU when you already have Ubuntu (or
Kubuntu and Xubuntu ) installed already on your machine. First of all I need to introduce you to
OpenGEU, it's a relativelly new Linux distro which uses Enlightenment ins....
This is something worth checking out! Everyone is familiar with Desktop Operating Systems...
Windows, Linux, MacOS etc... ...but do you know about online Web-based OS? Basically, you open a
(usually free) account where you are able to log in to see a fully functional desktop... all through
your web browser. It's just like working on a "normal" computer except that, because it's
online, you can access your work... and the programs from anywhere. If you haven't seen this,
it's probably better to have a live example. Here are four examples for you to....
Hi everyone. I would like to ask if anyone here knows how to compose a HTML based email, with
pictures and links, on Hotmail? I can't seem to compose one. Thanks in advance.....
Hello, guys! I found several web-sites which pay you for downloads of your files. It was
approved on other forums that are paying defenitely; they are not scam projects. Here, they are: 1.
www.depositfiles.com 2. www.letitbit.com 3. www.vip-file.com 4. www.upload.com 5. www.smsfiles.net
There are more information on their official web-sites. To know more about it, please visit them.
But, if you have questions, I may answer them.....
Specs Hardness: 1 Time: about 2 minutes Needings: -A (small) brain -A keyboard -MS Paint
Steps: 1. Press the Print Screen button on your keyboard. 2. Open Microsoft Paint. 3. Paste
(CTRL+V). 4. Save/Edit the image. (I prefer saving as .png or .tif) ét voila, you've just got
yourself a picture /wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif"
/>....
If anyone wants to become a guide at chacha.com; I have up to like 20 invites. give me your name
and email and i'll invite the first 20 people. When I get more invites i'll invite more
people. Here's some news articles about chacha:
http://abcnews.go.com/GMA/TakeControlOfYourLife/ http://news.com.com/2100-1038_3-6109782.html ....
Ok, so you want to host your own CSS Server on your computer eh? Well you will not need a lot of
things, and it is very simple. All you will need is time. /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> I did this tutorial
myself, from my experience when I made my own CSS Server. This is just a simple tutorial! It
ONLY covers the basics of making a CSS server! Lets Get Started! /laugh.gif"
style="vertical-align:middle" emoid=":lol:" border="0" alt="laugh.gif" /> 1. Download the HLDS
Update Tool from here . 2. On....
Ok i have made my own forum. Its cool and looks like its going to go places. Anyway i wanted to add
a website and other pages to this. So i can have my forum through my website. I need some info on
it please. What is the best way to work this out ? Im quite new to all this but learning all the
time. I just need someone kind to help me or point me in the right direction. Also can you please
let me know if its a bad idea to have a website and a forum. Or to just stick with the forum.
Thanks Chris... ....
Right, this is the first post of hopefully many in this thread. Basically the idea is to get many
developers together to share ideas and knowledge to create our very own game. First we'll be
asking for is any ideas of what kind of game everybody would like to make, and then we'll set
about assigning tasks depending on everybodies skills. We will need programmers, artists,
web-designers, even admin and marketing. This will be freeware, but the experience will be great.
So, ideas anyone?....
Ok this is my idea: I am making a website about anime. Its function is add anime, review anime,
search anime, anime information. Users can make a profile. People can make a profile which they can
edit to theire likes with html to give it a fancy look.(this is what my problem is about) What i
would like to know is how can i accomplish this. I already have the database for the anime titles
etc ready, the only thing that needs to be done is the profile section. If you have any tutorial,
tip or guide i would really really appriciate it. Thx in advance. ....
I was curious on what kinda car people have o.o; I have a 91' Eagle Talon TSi AWD it has a 6
cylinder Turbo its automatic and Its Pearl White! well it will be pearl white soon o.o; cause
i'm getting my dad to repaint it for me~ annd we are getting it registered next week!
i'm so excited. /laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0"
alt="laugh.gif" />....
Hello again everyone... By now many of you should know my story...this thread is just a
continuation of my last one, but in a new title, since this is not relevant at all to 'What to
do on a Date' thread. I am sorry if my case sounds a bit too...long and boring...but well really
don't know what to do and I need some advice...So please bear with me. Ok, here it
is...Yesterday I asked her out, with full confidence that she likes me 99.99% (because she glances
and smiles at me every now and then) and because her friends told me so (on Thursday). So after
schoo....
How to make a Counter Strike 1.6 Dedicated server What do we need ? HLDSupdatetool ->
http://www.steampowered.com/download/hldsupdatetool.exe NoSteamPatcher ->
http://www.gameszone.ro/downloads/no-won-steam.zip AdminMod + MetaMod ->
http://ovh.dl.sourceforge.net/source....50.60-win.zip StatsMe ->
http://ovh.dl.sourceforge.net/source....3-cstrike.zip Step 1 Create a dir were the server will be
installed example C:\HLDS Open hldsupdatetool.exe, click next , then I agree we will get to the
destination folder, here we press browse and select Local Disk C ,....
1.) this is the first.... go run nature runes then fletch yew longs and alch them for money you can
keep them noted and alch a few thousand times. if you don't have the fletching level make steel
platebodys which are more time consuming but well worth the while. 2.) merchanting. the best thins
to merchant are new items buy them for under 300k and sell for 500k on the first day of the new
treasure trail release. 3.) pking. start up a pking account withh some friends that you can all pk
on to get items like rune scimitars. 4.) pick flax in camelot then run to the ho....
Could you please let me know..How can I make calls from the internet? I know some of the tools
like skype with which we can call any landline number within a country..!! is there any tool
with which I can make calls to mobiles and to any country? Please reply to me.. Thanks in
advance.. Prakash ....
If you see these "make money online" things that say stuff envelopes, read emails or anything and
they ask you for money dont do it. Stay away. If it was that easy everyone would do it. There is
no easy way to get money. I am sure many will say yes there is look at this link. Well im not
gonna look at the link. People arent into giving away money. The only way to do it is to sell a
product or service. Find something your interested in and sell it....make a site about it, sell at
the flea market, farmers markets, any where you can..... So stay away from those mak....
Ok first of all, i have read through all the Firefox tune-up tutorials on the site, and none of them
have mentioned on how to make Firefox load faster like IE. So i thought i should make a easy
tutorial on it. REAL EASY WAY: Download Firetune: FIRETUNE And you will know what to do,
just muck around with the software’s settings. COMPLICATED BUT TECHNICAL WAY: And second of
all, all those who are still using IE (Microsoft's infamous Internet Explorer) get Firefox. Why
you may ask, read this: FIREFOX vs. IE . Have you ever noticed on how fast IE lo....
Ok, some people here have probabely been trying to make their computer look like Windows Vista. I
have to, i found themes and so on but nothing i like they were all crusty, i searched and searched.
And found one, The Vista Transformation Pack 4.0 (They will probabely make new versions of it).
http://www.softpedia.com/get/System/OS-Enh...tion-Pack.shtml It contains everything # Icons #
Themes # Visual Themes # Bootscreen # Login Screen # Sounds # Transparency # Start Menu Changes
(WIth Vista Button inseat of start) --Thats all i can think of but there probabely more.....
GUYS MAKE 50 CENTS PER CLICING ON A LINK HERE>> QUOTE click here1 click here 2 click
here 3 click here 4 click here 5 click here 6 click here 7 click here 8 click here
9 click here 10 click here 11 click here click here 12 click here 13 click here
14 click here 15 click here 16 click here17 click here18 click here19 click here
20 Long lists need to be in quote tags. Please read the trap17 readme. And I have moved the
other duplicate post to SPAM. http://www.trap17.com/forums/index.php?showtopic=371....
OK i have been playin for liken 4 years and i still can't get alot of gp. the mosti have had in
that time is like 10k and i have googled cheat codes and all that stuff and nothing works so any
ideas are welcome.....
I'm interested how many of you use .NET framework, how do you like it, what are it's pros
and cons, and anything that comes accross your mind related to it? I'm using PHP/MySQL
combination for now, but I'm considering move to ASP.NET. I've never even used ASP, so what
do you recommend? ASP.NET or NOT ASP.NET? Or maybe to start with ASP?....
Signature Tutorial Hello. A friend of mine made this tutorial for his site, and he
allowed me to post it here as well. Click here for the original tutorial.
______________________________________________ The Background QUOTE 1. OK, lets start by
creating a 320x100 document with white background in photoshop. Then Press "D" on your keyboard to
have your colors reseted. 2. Go to "Filter/Render/Clouds". You will have something similiar
to this: 3. Create a new layer. Then get the brush tool, and start brushing with black color on
t....
This is a simple and specific tutorial on how to make a basic web browser in Visual Basic 6. Steps
1-3 Create a new project, and then go to "Project" on the menu. Click components as shown in the
following image. Find the component "Microsoft Internet Controls," check it, and click "Apply" and
then "Close." Click the icon that was just added in the tools window, and draw a large sized
window with it. This is going to be where you view webpages through your browser, so don't make
it small, but leave room for buttons and other accessories. Steps 4-6 Make a t....
check out the konfuze.com website, they are a great community. they are always in development but
this program allows you to create your own mmorpg. it gives you a server and client package so if
you turn the server on and have the client avalable for downlaod on your website, they can connect
to your server and play your MMORPG Go check thier site out site link expired. check posts below
for alternatives. ....
i opened this place for we tell a reason why EA would make a Burnout version for PC. OMG they are
losting money. Burnout is the best racing game i ever ever played, think about in playing on lan
with 10 friends? every one today have a joystick for pc, so the game feeling was the same please EA
we are clamming for you to make a version to pc, is so hard to make it? i would apreciate if your
guys postion your feelings too, tkz....
Hey all, Over the last few years I have been experimenting with making money over the internet.
Being a very creative person I naturally took on to web design. However, I soon found that it was
too time consuming for my liking and it rarely paidf off. Whilst playing around with Photoshop
which someone bough me as a present I started to learn the essential techniques of graphic
designers. Before I knew it I was able to make basic logos that could be sold at a price. Not long
after discovering this I found a site that did forum auctions on logos. A customer requests a ....
At one time Opera was the fastest available web browser, that time has ended. By default firefox has
its turbo features shut off due to an error it used to display with tables. Use the tutorial below
to add 200shots of nos to firefox, and increase page speeds up to 4 times, making firefox the
fastest browser. 1) Open Firefox and on the address bar write about:config and hit enter
network.http.pipelining double click and change the value to true
network.http.pipelining.maxrequests double click and change the value to 34
browser.turbo.enabled double click a....
Hi Pe /cool.gif' border='0' style='vertical-align:middle' alt='cool.gif' /> ple ,
Can Any One Tell me how to build a Keylogger on Visual Bais 6.0 that no one
could see on the End Task Menu....
Looking for php, navigation, make, navigation, based, php
Searching Video's for php, navigation, make, navigation, based, php
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE
forum, Create your own topics, Ask Questions, track topics, setup
subscriptions & notifications and Get a Free Website w/ Email and FTP.