Jump to content

nsanford

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by nsanford

  1. I tweaked it a little and it works perfectly! thanks scootstah!
  2. I need to pull information from a db table for a slideshow on my page, and need a little help. All of the {$image}'s need to be pulled out and displayed in a div#slider first, then if $caption is set to 1, the caption info is displayed in a div#htmlcaption after the images div#slider. I have an example of the divs below the mysql query, but I'm not sure how to insert it into the while loop. TIA <?php $sql = mysql_query("SELECT * FROM slideshow"); if(mysql_num_rows($sql) > 0) { while($row = mysql_fetch_assoc($sql)) { $slideID = $row['slideID']; $image = $row['image']; $caption = $row['caption']; $caption_h3 = $row['caption_h3']; $caption_content = $row['caption_content']; $caption_link = $row['caption_link']; $caption_link_text = $row['caption_link_text']; } } ?> <div id="slider"> <img src="{$image}" alt="" title="#htmlcaption{$slideID}" /> <img src="{$image}" alt="" title="#htmlcaption{$slideID}" /> <img src="{$image}" alt="" title="#htmlcaption{$slideID}" /> </div> <div id="htmlcaption{$slideID}" class="nivo-html-caption"> <h3>$caption_h3</h3> <p>$caption_content</p> if($caption_link != '') { <p><a href="{$caption_link}">{$caption_link_text}</a></p> } </div>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.