Well first off you need to know that unchecked checkboxes don't get sent by the browsers. So you are going to have to deal with variables that don't exist.
I like to put my checkboxes into arrays in the form so that I don't have to do a bunch of isset() checks. Then I can just use a loop to walk through the array and act on each of the values that I find.
<input type="checkbox" name="cb[]" value="1">
<input type="checkbox" name="cb[]" value="2">
So in my called script all I need to do is:
for (reset($cb); $key = key($cb); next($cb)){
$value = $cb[$key];
// Do something baised on $value here
}
Now I don't need to worry about unchecked checkboxes.