Array of Checkboxes Problem
What I have is a basic form with an array of check boxes where the user can check off the relevant options - the restriction is that they must select at least one checkbox from the list before proceeding.
And then on the next page, I have it store what boxes they checked into my database.
Here's a chunk of the form code:
Note that I want to use "box" instead of "box1", "box2", etc so that it will become an array on the next page for PHP to process.
<input name="box" type="checkbox" id="box" value="1">
<input name="box" type="checkbox" id="box" value="2">
<input name="box" type="checkbox" id="box" value="3">
<input type="submit" value="Next" onClick="return checkForm(this.form);">
In other words, it's not properly accessing these check boxes.
I know how to see if a box has been checked when they aren't in the array form like above, but I need them to be in that array form for the PHP processing.
But that gives me an object error.
Thanks if you can help.