<? echo $photogl->name; ?> - in Page Title...

Discussion in 'PHP' started by photosales.co.nz, Aug 14, 2007.

  1. #1
    Hi there - in my page (as an example) http://www.photosales.co.nz/view_photog.php?photogid=10 - I would like the photographer name Mark Barker
    I would like in the title.

    Now in the page, it has <? echo $photogl->name; ?> that prints the persons name - how can I get that to show in my page title?

    $page_title = "Freelance New Zealand Photographers, NZ Photos from <? echo $photogl->name; ?>"; // PAGE TITLE FOR THIS PAGE - IF BLANK USE DEFAULT TITLE

    Above is what I have at the moment.
     
    photosales.co.nz, Aug 14, 2007 IP
  2. photosales.co.nz

    photosales.co.nz Peon

    Messages:
    371
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Here is the code out of the page that displays the Phootgraphers name:

     
    photosales.co.nz, Aug 14, 2007 IP
  3. killerj

    killerj Active Member

    Messages:
    765
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    95
    #3
    $page_title = "Freelance New Zealand Photographers, NZ Photos from <? echo $photogl->name; ?> 
    PHP:
    Are you sure that statement is inside the mysql fetch loop ? If its outside , I dont think $photogl->name will contain any data.
     
    killerj, Aug 14, 2007 IP
  4. photosales.co.nz

    photosales.co.nz Peon

    Messages:
    371
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Very good point...
     
    photosales.co.nz, Aug 14, 2007 IP
  5. photosales.co.nz

    photosales.co.nz Peon

    Messages:
    371
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Got it, just moved the title down further.
     
    photosales.co.nz, Aug 14, 2007 IP
  6. killerj

    killerj Active Member

    Messages:
    765
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    95
    #6
    Glad you got it fixed ;) but remember to use the "Edit" button Next time you post back-to-back lol , Some Mods will not like it ;)
     
    killerj, Aug 14, 2007 IP
  7. photosales.co.nz

    photosales.co.nz Peon

    Messages:
    371
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    photosales.co.nz, Aug 14, 2007 IP
  8. killerj

    killerj Active Member

    Messages:
    765
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    95
    #8
    But you said thats what you wanted to achieve in the post if i ain't mistaken.
     
    killerj, Aug 14, 2007 IP