All I can think of is using a script on the user side and concatenate a string to the post. You can use document.getElementById and get its values by creating all your check boxes inside a div with id or give your boxes directly the id.
Let me try to explain my self: In $_POST['checkboxes']
you would get a string divided by a known/selected by you character that you can split into a vector of strings with php's explode()
.
The concatenation, though, should be done by script on the user side.
Imagine you have the box with value hello, and the box with value world. What you'll have to do is instead of action="submit"
on your form, you'll have something like action="someJSFunction"
. This function should get all the checked boxes values in one string: String a += document.getElementById.value;
(or something like this) and then your function makes the submit. If those two example boxes were set and you'd chosed the \ character as division, in your php $_POST['checkboxes']
you'll get: hello\world.
If you want to keep your form action with submit, make your delete button type as submit and onclick make it call your function but with return false
so it waits for the end of the script to sumbmit. Something like: onclick"someFunc(this); return false"
I had this problem some time ago and this was the way I solved it.
Hope this helps.