Just set the value of the checkboxes to the filename, and set the name of the checkboxes to an array. The way checkboxes work: if they were not checked, they won't show up in the $POST array. So, lets assume you have this
<form method="post" action="nextpage.php">
File One: <input type="checkbox" name="files[]" value="file1.txt" />
<br />
File Two: <input type="checkbox" name="files[]" value="file2.txt" />
<br/ >
File Three: <input type="checkbox" name="files[]" value="file3.txt" />
<br/ >
File Four: <input type="checkbox" name="files[]" value="file4.txt" />
<br />
<input type="submit" />
</form>
And you only check File One and File Three, on your next page, you can see what was checked by looking at the $_POST['files'] array.
print_r($_POST['files']);