Jul 26, 2008

Change The Name Of The Paging Depending On Db Resu

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Change The Name Of The Paging Depending On Db Resu

kvarnerexpress
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

Reply

beeseven
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.

Reply

Spectre
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>
...

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : paging depending db resu


    Looking for change, paging, depending, db, resu

Searching Video's for change, paging, depending, db, resu
advertisement



Change The Name Of The Paging Depending On Db Resu



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE