Add the checkbox element and give it a name of "delete[]" (including the square brackets). Then the value for each one would be it's respective file-name.
<input type="checkbox" name="delete[]" value="<?php echo $filename ?>">
Then, in your script all you have to do is check to see if "delete" was set, and if it is, then loop through it and delete the appropriate files:
if(isset($_POST['delete']) && !empty($_POST['delete']))
{
foreach($_POST['delete'] as $file)
{
echo 'Deleting file [' . $file . '] ... ';
unlink('/path/to/the/'.$file);
echo 'Done!<br />';
}
}
Now, you'd have to do error-checking for bad "unlink" operations. Also, if the php server doesn't have the rights to the file to delete it, then unlink won't work. So you have to be careful about that too.