Jump to content

Image Display


natalieG

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>
Link to comment
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...
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

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.