Hi guys, My brain has just melted and I\'m not sure how to solve this problem.
I\'ve set up a form so that it creates a number of checkboxes depending on the contents in a database. In this case it lists
a number of available groups that you can select.
I\'ve named the checkboxes: Read$a where $a is a number between 1 and the total number of items in the database (it starts
at 1 and adds 1 via $a++; until there is no more results).
This gives me a form that has several checkboxes with the name: Read1, Read2, Read3 etc.
My problem is - I now want to loop through all the checkboxes and take out the values so I can work with them.
I thought that if I do a loop counting up from 1 to the last number (if the last checkbox is Read8 I would loop from 1 to
8) I could pick out the value. Something like this:
$a=1;
While ($a <= 8) {
$value=Read$a;
$value2=$Read.=$a;
$a++;
}
Not of it works. The first gives an error and the second returns nothing as a value.
So, help my melting brain - how do I take out the value of Read1, Read2 etc. in the loop?
/Björn