Jump to content

tables are shown more than once


princeofpersia

Recommended Posts

hi, i have the code below where it shows the images in connection with a reference. in my img table i only have two rows but the code below keeps showing it 7 times

 

can you please help me?

 

      <table width=200>
        <div id="wrapper">



                        <!-- Content area -->
                        <div id="content">

                                <!-- We will be working inside these tags -->
                                <div id="gallery">


                                <?php

                                $images=mysql_query("SELECT img.id, img.refimage, img.image, img.thumb, users.users_id FROM img, users WHERE img.refimage='$ref' AND users_id='$user_id'");
echo '<table width="40">';
while($row = mysql_fetch_array($images))
{
$image=$row['image'];
$thumb=$row['thumb'];
echo '<div class="image_container">';
              echo "<a href='$image' rel='lightbox[roadtrip]'><img src= '$thumb' width='60' height='40' alt='$title'>";
                echo '</a></div>';
                }

?>

                                </div>
                                <!-- We will be working inside these tags -->
                        </div>



                </div>
    </table></td>

Link to comment
https://forums.phpfreaks.com/topic/222670-tables-are-shown-more-than-once/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.