Generate your checkboxes like these:
<form method="post" action="whatever.php">
...
<input type=checkbox name="del[]" value="1">
<input type=checkbox name="del[]" value="2">
...
<input type=submit>
<input type=reset>
</form>
or, if you like predefined array indices:
<form method="post" action="whatever.php">
...
<input type=checkbox name="del[1]" value="1">
<input type=checkbox name="del[2]" value="2">
...
<input type=submit>
<input type=reset>
</form>
In whatever.php you will have an array-var named $del[] which contains the selected items.
To select all items I'm using this JS Function:
function all() {
var Msg = document.forms["yourframename"];
for (var x = 0; x < Msg.length; x++)
if (typeof Msg.elements[x].checked != "undefined")
Msg.elements[x].checked = true;
}
To unselect all items I'm simply reset the form.
Thomas