I am making a file manager that presents a list of files with checkboxes next to them. The value of the checkbox is the name. What is confusing me is how to get a list of checked files. If my list of checkboxes is like this:
<INPUT type="checkbox" name="file[0]" value="file0">
<INPUT type="checkbox" name="file[1]" value="file1">
<INPUT type="checkbox" name="file[2]" value="file2">
and so on, I can only get the name of the file if I know what box was checked. I suppose that I could do this by using array_keys ($file), but this is a cumbersome way to do it.
Is there a way to make PHP assign the input to an array if the name is "file" instead of "file[int]"?
I did this previously in Perl, and it was much easier. I hoped it would be easy in PHP. Am I missing something?