note 8131 deleted from function.empty by sniper

From: Date: Sat, 23 Aug 2003 00:22:56 +0000
Subject: note 8131 deleted from function.empty by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-54920@lists.php.net to get a copy of this message
Note Submitter: rusty@socrates.berkeley.edu ---- The way I check form values is to use isset() and then compare it against an empty string; e.g., if (! isset($form["x"]) || ($form["x"] == "")) error_bomb(); Using my method will allow people to submit 0 in form fields. If the !isset is true then the string comparison won't be done since the expression is true at that point, and if it is set then php does the string comparison.

« previous php.notes (#54920) next »