I think this capability is lacking in php.
Suppose there is a group of checkboxes all named "procedure" . Doing a
$_POST['procedure'] returns all the ones that are checked and not the
ones that are not checked. It would be nice if there were a way to get
them all and then discern which were checked. [Note: This can be done
in Javascript with document.getEle mentsByName('pr ocedure') and then
testing whether each of the child nodes is checked].
This post arose from a question I had posted in comp.lang.mysql . I have
a group of checkboxes and I would like to be able to put them all into
the database table, specifying which was checked and which was not. The
only way I can see doing that is to (a) sort the array by ID that is
returned from the $_POST and (b) compare each element in it with a list
of all the checkboxes ordered by ID used to generate the form. A little
tedious, but it would work.
Suppose there is a group of checkboxes all named "procedure" . Doing a
$_POST['procedure'] returns all the ones that are checked and not the
ones that are not checked. It would be nice if there were a way to get
them all and then discern which were checked. [Note: This can be done
in Javascript with document.getEle mentsByName('pr ocedure') and then
testing whether each of the child nodes is checked].
This post arose from a question I had posted in comp.lang.mysql . I have
a group of checkboxes and I would like to be able to put them all into
the database table, specifying which was checked and which was not. The
only way I can see doing that is to (a) sort the array by ID that is
returned from the $_POST and (b) compare each element in it with a list
of all the checkboxes ordered by ID used to generate the form. A little
tedious, but it would work.
Comment