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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to