RE: [PHP] check for variable value but need 0 to be good ?
| From: | Boget, Chris | Date: | Tue, 01 Aug 2000 18:45:17 +0000 |
| Subject: | RE: [PHP] check for variable value but need 0 to be good ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9510@lists.php.net to get a copy of this message | ||
> > 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 !!
> Make -1 the default, then compare the input against -1.
Or just use:
isset();
Chris