PDA

View Full Version : Idiot here... Needs help with PHP and document.title =



wheatleyweb
January 12th, 2009, 09:28 PM
Hello all,

I'm using PHP for the first time on a site of plant species. Simple PHP header and footer. How can I get the content.PHPs to change the document title. I'm sure this is a simple javascript function, but this doesn't seem to be working...


document.title=("TitleTitleTitle")

Each plant page needs to have the title of the plant so I can index and make searchable. Right now it only has the title I specified for the homepage (as it is part of the header)

Any help would be appreciated. It's ok to laugh. I can take it. I just cannot figure this one out.

Thanks

wheatleyweb

wheatleyweb
January 13th, 2009, 10:52 PM
ok... so I managed to get the title to replace onload of content phps. Another problem...

I have a site search, yet when I search a term it returns results with only the default header title. How can I have the search functions read the title as specified by the content pages?