Jump to content


Photo

Image Display


  • Please log in to reply
3 replies to this topic

#1 natalieG

natalieG
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 13 May 2006 - 03:13 PM


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>

#2 alpine

alpine
  • Members
  • PipPipPip
  • Advanced Member
  • 756 posts
  • LocationNorway

Posted 13 May 2006 - 03:33 PM

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

#3 natalieG

natalieG
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 13 May 2006 - 04:12 PM

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

#4 natalieG

natalieG
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 13 May 2006 - 04:41 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users