Jump to content


Photo

Link to Blank Image


  • Please log in to reply
3 replies to this topic

#1 phpbeginner

phpbeginner
  • Members
  • PipPipPip
  • Advanced Member
  • 215 posts

Posted 22 April 2006 - 02:12 PM

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

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 22 April 2006 - 02:18 PM

If you want an image to display tnen placed the path of the image in side the " marks like so:

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


#3 phpbeginner

phpbeginner
  • Members
  • PipPipPip
  • Advanced Member
  • 215 posts

Posted 22 April 2006 - 02:37 PM

[!--quoteo(post=367449:date=Apr 22 2006, 09:18 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 22 2006, 09:18 AM) View Post[/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:

$profile[$key]["image"] = "path/to/image/here.gif";
[/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--]

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 22 April 2006 - 03:53 PM

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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users