RE: [PHP] select prob.

From: Date: Sat, 03 Feb 2001 16:23:56 +0000
Subject: RE: [PHP] select prob.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37960@lists.php.net to get a copy of this message
then, why don't you instead have it NULL, like: <input type=text name=form[name] .. <input type=text name=form[email] .. <select name=form[country]> <option>Select your country <option>------------------- <option value=US>United State <option value=UK>United Kingdom .... then if it's empty it will be skipped ... I think ... I've never done so ... Ciao allo zio e la lista italiana, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) maxim@phpbeginner.com www.phpbeginner.com -----Original Message----- From: Netbrain di M.L. [mailto:net-brain@net-brain.net] Sent: Saturday, February 03, 2001 10:24 PM To: php-general@lists.php.net Subject: [PHP] select prob. Hi all, I'm in trouble checking client's value passed via a web form ... In a web form I usally use for the input's name a array var like this: <input type=text name=form[name] .. <input type=text name=form[email] .. <select name=form[country]> <option value=NONE>Select your country <option value=NONE>------------------- <option value=US>United State <option value=UK>United Kingdom .... and to generally check if some value is missing I use a simple routine like this: $manca=array(); foreach($array as $key=>$valore){ if(empty($valore) || $valore=="NONE"){ $manca[$key]++; } } where if $manca is greater then zero means that not all value was set .. My prob is that it never detects if the var $valore is equal to NONE ... I think that is due by my select field but at this moment I don't see how to correctly check if the passed values from it is a real value (as US,UK, etc.) or not (as NONE) ... any ideas? many thanks in advance max ------------------- Please Help Puppies ------------------- x -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#37960) next »