On Mon, 6 Aug 2001 08:57:08 -0500, garman ([EMAIL PROTECTED])
>I have a form that generates a list of "categories" dynamically.
>That is, for
>each category in a database, the form has a corresponding checkbox.
>checkboxes are given serialized names, such as "chkbx1", "chkbx2",
>I'm having trouble figuring out how to process these in the php
>script that
>handles this form.  In other words, how do I figure out which
>categories were
>selected when I don't know in advance how many categories there are?
> How can
>I check if the form variables "chkbx1", "chkbx2", etc have been set?

name them chkbx[1], chkbx[2]...

then on the next page go:

foreach($chkbx as $key=>$value){
        echo "chkbx[$key] is set.\n";

>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: php-list-

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to