Jump to content

How do you make a .php menu so I only have to update one file


meloncrack

Recommended Posts

Hi I'm learning about website design and I am studying it by applying my knowledge to it. this is my website that I have.

 

www.pokerhungry.com as you can see on the left hand side, there are a number of links

    *  Home

    * Introduction

    * Advice & Mistakes

    * Pre-Flop Play

    * Holdings at Flop Play

    * On the Turn

    * On the River

    * Special Moves

    * Odds

    * Glossary

 

To be honest all of these are separate pages as well. So for Introduction I will have    *  Home

    * Introduction

    * Advice & Mistakes

    * Pre-Flop Play

    * Holdings at Flop Play

    * On the Turn

    * On the River

    * Special Moves

    * Odds

    * Glossary

 

And for Advice & Mistakes page I would have

    *  Home

    * Introduction

    * Advice & Mistakes

    * Pre-Flop Play

    * Holdings at Flop Play

    * On the Turn

    * On the River

    * Special Moves

    * Odds

    * Glossary

 

 

So pretty much all of these are .html links. I'm pretty much a noobie. Someone told me I can make each link a .php for example (introduction.php, advice&mistakes.php) and pretty much I only have to change ONE FILE and it will update for all pages. Can someone help me? I heard this was called server side includes, but I called my hosting www.1and1.com hosting and they said they cannot allow us to use server side includes because they don't have that kind of functionality.

Can any professional php people help me figure this out

 

My AIM is : meloncracked

YAHOO is: meloncrack

MSN is: [email protected]

 

i love the person who can help me.

thanks.

Hi

 

I think you should really read basic tutorial of PHP.

Try this http://www.tizag.com/phpT/ . You should pick up basic php skills after a couple of days and than you will be able to do things you want.

when your host says they don't have server-side includes, they're probably referring to SSI, which is a rarely used technology. PHP includes will still work (assuming they have php?).

 

http://www.hudzilla.org/phpwiki/index.php?title=Including_other_files

 

Of course, you need some basic php knowledge to understand how to use them, but that website has a good introduction if you go back a few chapters/pages.

First of all, your going to need to learn some PHP for this. Secondly, I use 1and1 and yes you can use include()... they do not prevent you from doing this as it is a VERY commonly used PHP function.

Another consideration, you must be using one of 1and1's Linux packages (not MS) to use PHP.

 

FYI,

SSI != include();

 

http://en.wikipedia.org/wiki/Server_Side_Includes

 

 

The op will not need "Server Side Includes", php will be more than sufficient.

Also, I have 1and1 as well, and by default they offer you linux flavored servers, you have to find windows, if you'd want it.

I hate it when guys claim to act intelligent but they don't really help. If i didn't no basic php why would I be here. I went to the w3schools website and read the whole php tutorial. And on that, they don't teach you anything about including. Thanks to the young guy genericnumber1, he really knows whats going on. Thanks generic, to the other two I'm pretty disappointed, you just are out there to piss people off.

Actually include() is a very basic php command. If you are looking to learn php you need to look in every resource before coming to a help forum.

 

A couple of places to look:

First and foremost- http://google.com

http://php.net

There are many more but google and php.net are the best....

 

Afterthought: w3c has nothing to do with php standards.

I hate it when guys claim to act intelligent but they don't really help. If i didn't no basic php...

I lol'd.  Nice second sentence.

 

It's fun trying to run before you can walk, I do it all the time.  But I always try to go back and walk so I can figure out how to run better.

 

You can have one file named menu.php and on all your other pages, do an

include 'menu.php';

, and they will all be referencing the same file.  That way you can make a change to menu.php [add/remove/update a link] and all pages will reflect it.

 

PS> I wouldn't go naming pages add&mistakes.php, & symbols aren't the friendliest for urls.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.