Sorry, didn't read that you wanted to use unlink() on each file that was selected by a checkbox. I'm guessing your checkboxes are created dynamically. Assign them a name with brackets at the end so it becomes an array, and make sure the value of each checkbox is the image name
<input type="checkbox" name="to_delete[]" value="image1.jpg">
<input type="checkbox" name="to_delete[]" value="image2.jpg"><input type="checkbox" name="to_delete[]" value="image3.jpg">
That's what your html would look like after PHP made your checkboxes. If it was dynamic, you wouldn't input the image name manually for each checkbox, PHP would do it.
Then use a foreach loop to delete each image. You can even check if the file exists first.
foreach($_POST['to_delete'] AS $value) {
if (file_exists("path/to/file/" . $value) {
unlink("path/to/file" . $value);
}
}
Cgraz