When you create your form make the checkboxes name an array, like this:
<input type="checkbox" name="filename[]" value="<?=$filepath?>
Then after it's been submitted, run it through a foreach loop:
foreach($_POST['filename'] as $v) {
unlink($v);
}
My suggestion: Test this on something VERY unimportant 🙂
HTH,
Matt