If the result is always something, for instance in the worth case it is
'N/A'
then do:
if($AgeChild != 'N/A')
you can continue
isset check if the variable has at least a byte in it.
so this will return true:
$var = ' ';
if(isset($var))
echo 'got something in it';
Just check for what you know is inside (or not inside) the variable.
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-----Original Message-----
From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 23, 2001 8:07 AM
To: [EMAIL PROTECTED]
Subject: [PHP] isset()
People
I tried to check if teh field has set a vaule in it before submit using
isset with the sniplet below
if ((isset($AgeChild))=="false") {
$AgeChild = "NA";
}
The resule is that it always displays NA whether or not it has vaule in the
field, what is the correct way of using isset for this purpose? Or should I
use empty() ?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]