Jump to content

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


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.