Why don't you know the name of the checkbox? If you are generating them from the database you should have some kind of naming convention. All you need to do in the page after the form is do some isset() checks. Since the form will only send the checkboxes that are checked.
Also you can name you're checkboxes with something like name=checkbox[1] and then they are passes as an array and you can work with them like that.