RE: [PHP] isset()

From: Date: Thu, 22 Feb 2001 11:14:55 +0000
Subject: RE: [PHP] isset()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41139@lists.php.net to get a copy of this message
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) maxim@phpbeginner.com www.phpbeginner.com -----Original Message----- From: Jacky@lilst [mailto:jacky@activelifestyle.com] Sent: Friday, February 23, 2001 8:07 AM To: php-general@lists.php.net 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 jacky@activelifestyle.com "There is nothing more rewarding than reaching the goal you set for yourself"

« previous php.general (#41139) next »