princeofpersia Posted December 26, 2010 Share Posted December 26, 2010 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> Quote Link to comment Share on other sites More sharing options...
litebearer Posted December 26, 2010 Share Posted December 26, 2010 as a start, you are 'opening' tables and trying to display data WITHOUT properly using the tr and td tags, in addition you are using divs within the improperly structured tables Quote Link to comment Share on other sites More sharing options...
princeofpersia Posted December 26, 2010 Author Share Posted December 26, 2010 i have sorted it out, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.