nzfade Posted September 18, 2007 Share Posted September 18, 2007 Heres the link : http://www.studiokai.co.nz/products_lowcostawards.php?&make=1 Basically it displays 4 columns across, while going through a mysql database...but in IE7 falls apart, when i copy the code back, into dreamweaver, it looks exactly how it should be.....any help would be hugely appreciated. Thanks in Advance Here's the code $make = $_GET["make"]; // Metal Cup Range //$result = @mysql_query("SELECT * FROM tbl_Products WHERE make = '1' && model = 'Metal Cup Range' "); $result = @mysql_query("SELECT * FROM tbl_Products WHERE make = '1' "); $row_count = 1; $cols = 4; // If else statement for make //echo 'Low Cost Awards</br>'; //echo 'Click on any Image to see Price & Quality Picture</br></br>'; //echo 'Metal Cup Range</br></br>'; while ($row = mysql_fetch_array($result)) { $product_id = $row["product_id"]; if ($row_count %$cols == 0) { echo "<td><center>"; //echo $row_count; echo '</br>'; echo '</br>'; echo $row["product_size"]." <p>"; echo "<a href='index.php?&product_id=$product_id'><img src='products/large/" . $row['image' ] . " ' ' /><br></a>"; echo $row["product_title"]." "; echo "</center></td>"; echo"</tr><tr>"; } else { echo "<td><center>"; //echo $row_count; echo '</br>';echo '</br>'; echo $row["product_size"]." <p>"; echo "<a href='index.php?&product_id=$product_id'><img src='products/large/" . $row['image' ] . " ' ' /><br></a>"; echo $row["product_title"]." "; echo "</center></td>"; } $row_count++; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/69814-solved-using-a-while-loop-to-display-tables-works-in-firefoxopera-but-not-ie7-help/ Share on other sites More sharing options...
tibberous Posted September 18, 2007 Share Posted September 18, 2007 The only site that needs to work in IE 7 is getfirefox.com. ~ Firefox - Rediscover the web ~ While I wasn't able to really see the problem with the code, I'd recommend you view source on the page. As it stands everything is ending up in one cell which a bunch of center tags around it. Quote Link to comment https://forums.phpfreaks.com/topic/69814-solved-using-a-while-loop-to-display-tables-works-in-firefoxopera-but-not-ie7-help/#findComment-350717 Share on other sites More sharing options...
nzfade Posted September 18, 2007 Author Share Posted September 18, 2007 when i drag the generated html code out, it basically gives me <table> <tr> <td></td> <td></td> <td></td> <td></td> Quote Link to comment https://forums.phpfreaks.com/topic/69814-solved-using-a-while-loop-to-display-tables-works-in-firefoxopera-but-not-ie7-help/#findComment-350723 Share on other sites More sharing options...
nzfade Posted September 18, 2007 Author Share Posted September 18, 2007 when i drag the generated html code out, it basically gives me <table> <tr> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> </tr> </tr> this is an extra one, but I don't see it causing the problems......or is it? </table> Quote Link to comment https://forums.phpfreaks.com/topic/69814-solved-using-a-while-loop-to-display-tables-works-in-firefoxopera-but-not-ie7-help/#findComment-350728 Share on other sites More sharing options...
cooldude832 Posted September 18, 2007 Share Posted September 18, 2007 for echoing talbes I always echo the closures after wards and just assumed close them outside the loop because it will always need a closing. Quote Link to comment https://forums.phpfreaks.com/topic/69814-solved-using-a-while-loop-to-display-tables-works-in-firefoxopera-but-not-ie7-help/#findComment-350731 Share on other sites More sharing options...
nzfade Posted September 18, 2007 Author Share Posted September 18, 2007 for echoing talbes I always echo the closures after wards and just assumed close them outside the loop because it will always need a closing. --------------------------- are you able to give a quick example? I'm not to sure what you mean Quote Link to comment https://forums.phpfreaks.com/topic/69814-solved-using-a-while-loop-to-display-tables-works-in-firefoxopera-but-not-ie7-help/#findComment-350739 Share on other sites More sharing options...
sasa Posted September 19, 2007 Share Posted September 19, 2007 try to remove extra ' in lines echo "<a href='index.php?&product_id=$product_id'><img src='products/large/" . $row['image' ] . " ' ' />.. red one Quote Link to comment https://forums.phpfreaks.com/topic/69814-solved-using-a-while-loop-to-display-tables-works-in-firefoxopera-but-not-ie7-help/#findComment-350849 Share on other sites More sharing options...
nzfade Posted September 19, 2007 Author Share Posted September 19, 2007 hi salsa you got it that fixed it........ one ' let me spend a bout 6 hours trying to work out what I had done wrong, thanks again for your help Quote Link to comment https://forums.phpfreaks.com/topic/69814-solved-using-a-while-loop-to-display-tables-works-in-firefoxopera-but-not-ie7-help/#findComment-350854 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.