Re: isset()

From: Date: Thu, 22 Feb 2001 10:15:07 +0000
Subject: Re: isset()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-41117@lists.php.net to get a copy of this message
> 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"; > } if you removed the quotes around "false" it should work (as currently "false" is being treated as a string) but another way to do this is like : // if not set then ... if ( !isset($AgeChild) ) { $AgeChild = 'NA'; } Regards, Philip Olson http://www.cornado.com > 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

« previous php.general (#41117) next »