First off I'd change the naming scheme that you've choosen. They way you have it you have to parse all variables that start with category. It's much easier if you make your checkboxes have a name like category[]. PHP will automatically turn all selected checkboxes into an array on submit.
Second instead of having the value be 'ON' make that the $current_row[3], which I'm assuming is a unique identifier of some sort.
Now you can easily loop through your array and get all of the unique ID's that were selected.
reset($category);
while (list($key, $value) = each($category)) {
// do what you need to do here
}
It's that simple, you will get the variable $value populated with the unique id that you assigned to the value of each checkbox, for each one that was selected, if none were selected the loop doesn't even process.