Jump to content

[SOLVED] Simple query - re: page navigation..


TomasD79

Recommended Posts

Hi,

 

I'm a web developer (hobbyist), with enough xhtml/css knowledge to put a decent site together.. PHP is not a strong point at all!!

 

I use PHP includes to seperate navigation etc but thats about it..

 

I have a site I am working on at the moment that has about 70 different pages, spread through 6 topic areas.. I was looking for a way of reducing the number of html/php files I have on the site (basically to keep things organised).. I've been googling away and it seems that I can use PHP to actually bundle pages of the same topic into one file.. but for all the reading I'm doing I'm stuck on symantics..

 

Essentially what I want to do is have eg. titles.php which includes a side nav relevant to all the titles.. then if a user clicks on title1 it calls from further down the page..

 

so links would be

<a href=?page="title"&content="title1">title 1</a>

 

i think Im right that the code for the div inwhich the dynamic content will sit will be something along the lines of

 

 <? if (page=title&content=title1) {TITLE1 CONTENT}
elseif (page=title&content=title2) {TITLE2 CONTENT}
else {WELCOME to title} ?> 

 

it seems that it should be simple, but Im stuck on how to express the PHP can anyone help?

 

Thanks for reading

Link to comment
https://forums.phpfreaks.com/topic/41685-solved-simple-query-re-page-navigation/
Share on other sites

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.