Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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