green917 Posted November 17, 2010 Share Posted November 17, 2010 Any help any of you gurus could give me here would be greatly appreciated. I have a very simple php/mysql script that opens a template page and displays the title, picture (at least it's supposed to display the pic) and ingredients, etc. from a db table called 'recipes'. In firefox and all other compliant browsers, the whole function works fine. In Internet Explorer however, the images don't display and it simply prints the html img tag out on the user's screen. Please help if you can. Here's the applicable code: $result=mysql_query("SELECT * FROM recipes where id = ".$_GET['id']."") or die("Could not connect to database!"); while($row=mysql_fetch_row($result)) { echo "<h2><center>".$row[1]."</center></h2>\n"; echo "<center><img src='http://www.healthylifestylegourmet.com/images/".$row[4]." width='".$row[5]."' height='".$row[6]."' /> </img></center><br/>\n"; Everything but the picture displays perfectly using virtually the same syntax and, as I said, it works fine in compliant browsers. I'm at a loss and have been staring at it for far too long. Thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/218929-i-cant-see-where-the-code-is-wrong-i-hate-ie/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 17, 2010 Share Posted November 17, 2010 Your HTML is invalid (missing the closing single-quote on the src='....' attribute.) The browsers where your page works are ignoring the error(s) in your markup. You should always validate your markup and it should be error free before you attempt to check its operation in different browsers. Quote Link to comment https://forums.phpfreaks.com/topic/218929-i-cant-see-where-the-code-is-wrong-i-hate-ie/#findComment-1135388 Share on other sites More sharing options...
mikecampbell Posted November 17, 2010 Share Posted November 17, 2010 You've got a few html problems there (run it through an online validator), but most importantly your image src is missing the closing single quote. Quote Link to comment https://forums.phpfreaks.com/topic/218929-i-cant-see-where-the-code-is-wrong-i-hate-ie/#findComment-1135391 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.