0

Alright, so I've got this dynamic form. My problem is.. the name could be anything between "1" to "100000" depending on what the output of a script is and which parts of the output the user chooses to select. What would you do to get all of the values from the form?

Update: Also, assume there could be 1,000 to 2,000 different checkboxes.

Here's what I'm using for my input:

<input type="checkbox" name="<? echo $userRow["id"]; ?>" value="<? echo $userRow["id"]; ?>" />

Edited by Encrypted: n/a

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Encrypted
1

Bro that is insane..

Name the checkboxes just one name that ends with"[]" like "checkboxes[]"

and then if you want to process it after sending it to a processing page.. it will be sent as an array and you should use:

$value = $_POST['checkboxes'];

foreach ($value as $value2)
{
 echo $value2;
}

by the above code, you will get all the selected values in the checkboxes :P

0

Sweetness, thank you. Didn't know you could pass an array through a form.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.