Re: check for variable value but need 0 to be good ?

From: Date: Tue, 01 Aug 2000 18:37:13 +0000
Subject: Re: check for variable value but need 0 to be good ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9509@lists.php.net to get a copy of this message
Make -1 the default, then compare the input against -1. Adrian Smith wrote: > I am checking a field to make sure the user has entered a value but in the > situation I have the user can and may need to pick 0 in the drop down which > is then treated as no value when checked for a value, is there a way I can > get it to treat 0 only has a value and still check for a value as normal ? > > Any one know ? or have any ideas !! > > Adrian Smith > ------------------------------------------------------ > ade@stormbreaker.com > ------------------------------------------------------

« previous php.general (#9509) next »