Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2005

    echo MySQL data into page title

    I've been stuck on this for months, not sure what I'm doing wrong or even if it can be done.

    At the moment my sites header is in a global config file including the title tag, the first part of the title is located within this config file (so its the same on each page) the second part is in the following code on each page:

    <?php echo get_header('My Title For This Page') ?>
    So I end up with the following page title:
    My site name | My Title For This Page

    What I want to do is echo some info from my DB instead, is this possible?

    Something like this:
    <?php echo get_header('$heli['9']') ?>
    Which would echo the info from the DB to the page title, but it doesn't want to work.

    Any help will be appreciated
    C program run. C program crash. C programmer quit.

  2. #2
    Join Date
    Aug 2002
    United Kingdom
    You'll need to include a page that already calls your SQL table and then use that (I believe).
    View Portfolio

    A trusted WHT member for over 7 years!

  3. #3
    If you have some PHP knowledge, this page will help you in what you are trying to achieve - ht tp://

  4. #4
    If you want to PM me, I will help you out.

Similar Threads

  1. embeded you tube video in web page affects page title on IE
    By BM136 in forum Web Design and Content
    Replies: 5
    Last Post: 11-16-2008, 07:45 AM
  2. php function won't return data but can echo it?
    By lexington in forum Programming Discussion
    Replies: 8
    Last Post: 06-26-2008, 07:47 AM
  3. Can you set page title with CGI?
    By dynawebd in forum Programming Discussion
    Replies: 2
    Last Post: 05-10-2006, 05:31 PM
  4. WHT page title.
    By ub3r in forum WHT Announcements, Feedback and Questions
    Replies: 14
    Last Post: 02-13-2006, 11:34 AM
  5. Adding data to table - send to other page PHP/MySQL
    By hdezela in forum Programming Discussion
    Replies: 1
    Last Post: 01-03-2004, 12:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts