you could first check for isset($_POST['keyword']) and then if that passes
check what keywords you have.  or you could write an additional html tag to
the page like.  <input type="hidden" name="keyword[]" value="NA">.  This
would force the $_POST['keyword'] array to exist and then you'd have to
strip that from your array when processing it

hth
Jeff


                                                                                       
                                                 
                      Keith Wilkinson                                                  
                                                 
                      <[EMAIL PROTECTED]        To:       [EMAIL PROTECTED]            
                                               
                      be.ne.jp>                cc:                                     
                                                 
                                               Subject:  [PHP-DB] Determining if 
checkbox is selected in PHP                            
                      09/09/2003 08:09                                                 
                                                 
                      AM                                                               
                                                 
                                                                                       
                                                 
                                                                                       
                                                 




I'm storing the values from a groups of checkboxes
in an array "keyword[]", but $_POST['keyword'] is
undefined if none of the checkboxes is checked.
I tried using "in_array()" with $_POST to determine
if any of the group of 'keyword' checkboxes is checked,
but can't get it to work;  does anyone have any
suggestions?

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

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

Reply via email to