Is there a way to extract the form field name along with the file name out of $_FILES?
I see the form field name associated with each file array when I dump $_FILES with print_r for example, but I'm stumped as to how to extract those along with the actual file name.
When I find an error with a certain file (wrong file type or something) I want to alert the user of the error which includes the form field name along with the actual file name. This will help in identifying particular form fields when using a form with many file upload fields.
For example, if I have a file upload form field named="Essay" (or if using an array ="files[Essay]"), I'd like to inform the user of that form field in my error message. I've got every aspect of the file upload process working, I'm just stumped with trying to get the form field name.
Anyone done this before or know how? I'd appreciate any help.
Thanks,
Ben