Jump to content

Archived

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

natalieG

Image Display

Recommended Posts


We have this code to display an image in a Table of an HTML section of a php file.
The image does not display, the browser showing the little square for a missing image. The image
file is in the same directory as the source file.
Thanks,

Michelle


<TD COLSPAN="2" WIDTH=<?php echo $TABLEWIDTH ?> ALIGN="center">
<img src=<?php echo "title.jpg" ?>></td>

Share this post


Link to post
Share on other sites
you are missing some [!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--];[!--colorc--][/span][!--/colorc--] and it should give you a error msg when loading the php file, doesn't it? Also missing some double quotes in your src - [!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]"[!--colorc--][/span][!--/colorc--]

<TD COLSPAN="2" WIDTH=[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]"[!--colorc--][/span][!--/colorc--]<?php echo $TABLEWIDTH[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--];[!--colorc--][/span][!--/colorc--] ?>[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]"[!--colorc--][/span][!--/colorc--] ALIGN="center">
<img src=[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]"[!--colorc--][/span][!--/colorc--]<?php echo "title.jpg"[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--];[!--colorc--][/span][!--/colorc--] ?>[!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]"[!--colorc--][/span][!--/colorc--]></td>

i still cannot understand why you are echo'ing a hard coded img name, assume its just for this example code...

Share this post


Link to post
Share on other sites
Thanks very much for the help. We have corrected our syntax a you reccomended, but the
main issue was that the jpg file was corrupted. It is really strange, the image opened and
displayed fine on Corel Photopaint, but in Adobe Goliove, the image icon indicated a torn
image. we changed to another image file and everything is cool.

Thanks again

Natalie

Share this post


Link to post
Share on other sites
The reason the image did not dosplay is that the image was in CMYK format before it wasa
stored as a JPEG. Corel will open that, but a browser will not. when we converted the image
to RGB color space, everything worked fine. I do not know why we did not get anb error messafe,
except that we were openiong the file in PHPEdit and it may do as extensive a syntax check.


Thanks again

Melanie

Share this post


Link to post
Share on other sites

×

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.