in reply to CGI-SQL-HTML-Display "no image"
Once you've constructed the filename, $fn, you can use a file test operator to check if it exists.
to link a default image, ormy $fn = make_filename($user); # or whatever $fn = '/path/to/default.jpg' unless -f $fn; print link_pic($fn);
to simply leave out the link.if ( -f $fn ) { print link_pic($fn); }
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: CGI-SQL-HTML-Display "no image"
by WhiteBird (Hermit) on May 24, 2003 at 15:27 UTC | |
|
Re: Re: CGI-SQL-HTML-Display "no image"
by WhiteBird (Hermit) on May 25, 2003 at 01:38 UTC | |
by Zaxo (Archbishop) on May 25, 2003 at 01:53 UTC | |
by WhiteBird (Hermit) on May 26, 2003 at 06:23 UTC |