|
|
|
|
![]() ![]() |
Sep 26 2005, 07:56 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 407 Joined: 13-December 04 Member No.: 2,696 |
Hi guys, the best way to describe what i want to do is by example so..
Say I got a database of people. Say the name of the site is peopledatabase.com(So when u minimise it the site in the taskbar says peopledatabase.com -Microsoft Internet Explorer). Now when i search the db and find a person, i want the name of that page to change to the name of the person found. i.e Information about John Smith - Microsoft Internet Explorer. At the moment the name is the same for every page, anyone got any ideas or examples on solving this problem plz? Many thanks kvarnerexpress |
|
|
|
Sep 26 2005, 09:18 PM
Post
#2
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 629 Joined: 26-February 05 Member No.: 3,995 |
What I would do is just to do all the database queries before you do any of the html. That way, when you start outputting html, you can put something like "Information about $name" in the <title> tags.
|
|
|
|
Sep 27 2005, 05:36 AM
Post
#3
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 874 Joined: 30-July 04 Member No.: 246 |
I would probably do something like this (similar to what beeseven suggested):
CODE <?php
// Obviously, this isn't a real function, just an example. $result = extract_database_information(); $page_title = $result['page_title']; ?> <html> <head> <title><?=$page_title == '' ? '' : $page_title . ' - ';?>Peoplesdatabase.com</title> </head> <body> ... |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 7th October 2008 - 10:14 PM |