Gossamer Forum
Home : Products : DBMan : Customization :

quick question on an 'if'

Quote Reply
quick question on an 'if'
Code:
if ($rec{'Avatar Address'}) {
print qq|
<img src=$url{'Avatar Address'}>
|;

ok what Im wanting to do is
if $rec{'Avatar Address'} reports back as empty
display a default picture
everything Ive tried as broken and not given a 500 error so I can't catch it that way.

this is going under the sub for printing records

so in common english I suppose

if {there is information stored in $rec{Avatar Address} print the image
if the $rec{Avatar...} is blank, dont print it (havent decided on whether to use a default 'no picture selected' image or to just leave it blank

what I currently have, should do that above...but instead it prints a red X box
I used the configarator(sp) to create the base for me to design around (thank you so much for that tool as well)
but it predefines $rec{'Avatar Address'} as
$url{'Avatar Address'}

Code:
$url{'Avatar Address'} = $rec{'Avatar Address'};
$url{'Avatar Address'} =~ s/<\/?B>//g;
-keeps thinking outloud-



any pointers to the correct direction would be most appriciated.

Last edited by:

zeroisgod42: Apr 3, 2003, 8:13 PM
Subject Author Views Date
Thread quick question on an 'if' zeroisgod42 2356 Apr 3, 2003, 8:05 PM
Thread Re: [zeroisgod42] quick question on an 'if'
esm 2265 Apr 3, 2003, 8:12 PM
Thread Re: [esm] quick question on an 'if'
Watts 2259 Apr 4, 2003, 4:06 PM
Thread Re: [Watts] quick question on an 'if'
Paul 2270 Apr 4, 2003, 4:44 PM
Post Re: [Paul] quick question on an 'if'
Watts 2252 Apr 6, 2003, 1:53 PM
Post Re: [zeroisgod42] quick question on an 'if'
joematt 2270 Apr 4, 2003, 9:00 AM