Jump to content

Archived

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

phpbeginner

Link to Blank Image

Recommended Posts

I am trying to link to a "No Photo Available" image if no file is uploaded ( rather than having a blank space ). I just can't seem to get it to work.

The code is

[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]} else {
$profile[$key]["image"] = "";
}[!--colorc--][/span][!--/colorc--]

Right now this just shows a blank area with no borders and I would like to link to an image file which I have made.

Thanks in Advance

Share this post


Link to post
Share on other sites
If you want an image to display tnen placed the path of the image in side the " marks like so:

[code]$profile[$key]["image"] = "path/to/image/here.gif";[/code]

Share this post


Link to post
Share on other sites
[!--quoteo(post=367449:date=Apr 22 2006, 09:18 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 22 2006, 09:18 AM) [snapback]367449[/snapback][/div][div class=\'quotemain\'][!--quotec--]
If you want an image to display tnen placed the path of the image in side the " marks like so:

[code]$profile[$key]["image"] = "path/to/image/here.gif";[/code]
[/quote]


Thanks, I did do that originally, thats why I thought something I was missing. All I get is the path text displaying in the area now.

[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--] /profile/uploads/nophoto.jpg [!--colorc--][/span][!--/colorc--]

Share this post


Link to post
Share on other sites
Oh, in that case do this:
[code]$profile[$key]["image"] = "<img src=\"path/to/image/here.gif\" alt=\"No Photo Available\" />";[/code]

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.