RE: [PHP] How to pass null as value?

From: Date: Wed, 11 Sep 2002 11:46:49 +0000
Subject: RE: [PHP] How to pass null as value?
Groups: php.general 
Request: Send a blank email to php-general+get-115957@lists.php.net to get a copy of this message
Hi Chuck, > how do you pass null on to a page as a value. > Let say in a field where you have a yes and no. > Null needs to equal no. Pass from where? If it's a checkbox on a form, just use isset() to test for the existence of the variable: true means it's ticked, false means it isn't. If it's from MySQL I'd suggest using an ENUM('y','n') or a TINYINT field instead, but I suppose you could test for things like empty or zero-length strings. Cheers Jon

« previous php.general (#115957) next »