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
:
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.
The fact that it is undefined if none of the checkboxes
are checked is expected behavior. Just do:
if( isset( $_POST['keyword'] ) {
}
to