Similar to what the other answers have already pointed out, here is a way to do it:
while (!$listof_artist->EOF) {
$id = $listof_artist->fields['id'];
$arr_id[] = $id;
echo "<tr><td><input type='checkbox' value='$id' name='$id' id='$id' /></td>";
}
if(isset($_POST['submit'])){
foreach($arr_id as $checkbox){
if (isset($_POST[$checkbox])) {
// Checkbox is checked
echo 'Artist id ' . $checkbox . ' is checked <br/>';
}
else {
// Checkbox is NOT checked
echo 'Artist id ' . $checkbox . ' is NOT checked <br/>';
}
}