[PHP] testing for blank var

2002-03-21 Thread ROBERT MCPEAK

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 bNo Image URL Entered/bbr;
}
else
{
echo img src=\$img_url\;
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] testing for blank var

2002-03-21 Thread Rick Emery

if ( ! ISSET($img_url) )


-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 8:18 AM
To: [EMAIL PROTECTED]
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 bNo Image URL Entered/bbr;
}
else
{
echo img src=\$img_url\;
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] testing for blank var

2002-03-21 Thread ROBERT MCPEAK

Beautiful!

 Rick Emery [EMAIL PROTECTED] 03/21/02 09:19AM 
if ( ! ISSET($img_url) )


-Original Message-
From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 8:18 AM
To: [EMAIL PROTECTED] 
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 bNo Image URL Entered/bbr;
}
else
{
echo img src=\$img_url\;
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php