Jump to content

[SOLVED] Inserting content via tabbed menu


jameshurrell

Recommended Posts

I'm a complete novice at PHP, but I do have some limited coding experience. I have a static HTML based website that I'm in the process of converting to PHP - the reason being that I want to take advantage of the ability to include headers and footers in pages - i.e. rather than having to modify EACH page, simply modify the footer.pph (for example).

 

I have managed quite well so far and have created and index.php that pulls in a header.php, a sidebar.php and a footer.php using the include function. This all works on my hosted space.

 

However I'm stumped on how to pull in the main content for each page. My existing website has a tabbed menu, so I'd like to be able to do the same - i.e. each tab has identical header, footer and sidebar, but different main content.

 

I have seen examples "in the wild" that use a syntax like the following in the browser:

 

http://www.website.com/index.php?p=accommodation

http://www.website.com/index.php?p=prices

 

using the following type URL in each tab:

 

<a href="index.php?p=accommodation">

 

How would I go about this? I assume that the content for each tab would need to be stored in individual HTML or PHP pages, but it's the pulling in bit I don't understand... i.e. the syntax required to do this. Can anyone help (or indeed understand what I am rabbitting on about)?

Thanks.

 

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.