SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Jul 2003
    Location
    england
    Posts
    823
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question IF, Else, or elseif?

    I have a page with names listed on the left. When the user clicks the name, a mini-bio displays on the right. What I would like to do is when the page first loads (before the user clicks on any names), I would like to have a message displayed on the right. I'm currently stuck on where to insert the message 'click on a name on the left to read a mini-bio' within my code.

    Can someone give me a clue?
    PHP Code:
    <div style="float: right; display: inline; width: 350px;">
    <?php if (!empty($row_getCoach['staff_photo'])) { echo '<div
     id="mainpic"><img src="../photos/staff/' 
    $row_getCoach
    ['staff_photo'] .'" 'getDims($row_getCoach['staff_photo'],
     
    '../photos/staff/') .' ''alt="'$row_getCoach['staff_name'
    .
    '" /></div>'; } ?>
    <strong><?php echo $row_getCoach['staff_name']; ?></strong>
    <?php
    $text 
    nl2br($row_getCoach['staff_desc']);
    $after str_replace("<br />""</p><p id=\"picBio\">"$text); ?>
    <p id="picBio"><?php echo $after ?></p></div>
    Thank you!
    toad78

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    That's not enough code to answer your question, and it's not clear if that whole thing is the bio you're talking about or something else.

    How do you know, programmatically, whether a link has been clicked? What's the name of the variable you're adding to the query string?


Bookmarks

Posting Permissions

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