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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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