Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- It would be nice
November 13, 2008, 1:31 pm
rate this thread
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
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.
Re: It would be nice
DOM != POST/GET request.
Sounds like you're trying to use the wrong approach. This has
nothing to do with PHP and everything to do with how the (X)HTML spec
defines "successful controls." Since your "problem" is actually
standard HTML behavior, it is the same with any language processing
Before attempting to fault a language, you should attempt to better
understand the issue at hand.
 <URL:http://www.w3.org/TR/html4/interact/forms.html#successful -
$email = str_replace('sig.invalid', 'gmail.com', $from);