Jump to content

I can't see where the code is wrong & I HATE IE


green917

Recommended Posts

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!

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.

Archived

This topic is now archived and is closed to further replies.

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