Use an array to hold the values of the input. With a check box, an array will be returned containing the values of whichever checkboxes are checked.
<INPUT TYPE=CHECKBOX NAME="delete_this[]" VALUE='<? echo $messageID; ?>>
If they check of 5 boxes, then delete_this[] will have 5 elements, if they check off 10, it will have 10 elements.
you can read it with:
foreach($delete_this as $value){
// delete row with ID of $value here
}