Re: Re: [PHP-DB] Re: radio form submission

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 24 June 2011 21:44:05 Chris Stinemetz wrote:
> if (!array_key_exists($_POST['store_type'], $choices)) {
>                                                                           
>  echo "You must select a valid choice.";

Nothing wrong to me. Perfectly valid way of checking if there is at least one 
selected radio button (I prefer isset($_POST['store_type']), but that is just 
a matter of taste).
Some debugging can help you. Try insert this:

var_dump($_POST['store_type']);
var_dump($choices);

just before validation if (!array_key_exists(...

HTH

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux