RE: [PHP] testing for blank var
| From: | ROBERT MCPEAK | Date: | Thu, 21 Mar 2002 14:22:49 +0000 |
| Subject: | RE: [PHP] testing for blank var | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-89502@lists.php.net to get a copy of this message | ||
Beautiful!
>>> Rick Emery <remery@excel.com> 03/21/02 09:19AM >>>
if ( ! ISSET($img_url) )
-----Original Message-----
From: ROBERT MCPEAK [mailto:RMCPEAK@jhuccp.org]
Sent: Thursday, March 21, 2002 8:18 AM
To: php-general@lists.php.net
Subject: [PHP] testing for blank var
if $img_url has a value, then I'd like to show the image, if it
doesn't,
then I'd like to show a message. What's wrong with my code? Am I
incorrectly testing for the value? The else works fine, but not the
if.
Thanks!
if (!$img_url)
{
echo "<b>No Image URL Entered"</b><br>";
}
else
{
echo "<img src=\"$img_url\">";
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php