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> Link to comment https://forums.phpfreaks.com/topic/222670-tables-are-shown-more-than-once/ 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 Link to comment https://forums.phpfreaks.com/topic/222670-tables-are-shown-more-than-once/#findComment-1151547 Share on other sites More sharing options...
princeofpersia Posted December 26, 2010 Author Share Posted December 26, 2010 i have sorted it out, Link to comment https://forums.phpfreaks.com/topic/222670-tables-are-shown-more-than-once/#findComment-1151548 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.