It's very possible that I am doing things in a difficult way, but I am asking anyways.
I have a page which lists a varying number of records from a db in a table, each one with a check box in front of them. In the checkbox value I put the ID of each record, the names of all checkboxes are "name1, name2, name3", etc. When the form is submitted, I want the selected records to be deleted from the database.
I tried to do this by doing a for statement checking for values of checkboxes with names "name" and then the counter "i". However, how can I concatenate the name of this variable and use it?
For example, how can I read the value of the checkbox name26. If I do the for with counter i, my first hope was doing something like
for ($i=0; $i<=50; $i++) {
if ($name$i<>"") {
// do my stuff
}
}
but it doesn't work.
Thanks for any help,
Bernhard S.