Forum Moderators: coopster

Message Too Old, No Replies

Help with Page Titles

         

dwighty

8:05 am on Sep 26, 2005 (gmt 0)

10+ Year Member



Hi Guys,

I am still fairly new to php coding and am wanting to be able to change page titles when the user selects which page they view.

I dont want to have a header for every page and change it manually but i believe we should be able to some how in php set some conditions.

I want to have 1 .php file which is the header.php The on every page i will include it.

How do i get started setting this up.

Not too sure if this makes any sense or not.

I would image that i have to set variables which are the page titles...but after that i have no clue.

Any help would be appreciated.

thanks in advance.

Dwighty

dwighty

9:06 am on Sep 26, 2005 (gmt 0)

10+ Year Member



I believe that i have sorted this out now..will have to test it a bit later.

coopster

7:36 pm on Sep 26, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You could set a variable $title before you include your header page. I believe there was an example of this once ... here it is:

A dynamic site in 2 minutes [webmasterworld.com] -- message number 9.

dwighty

11:20 am on Sep 27, 2005 (gmt 0)

10+ Year Member



coopster,

Thanks for your reply. my Final Solution kind of works on that principle.

Thanks