When you have multiple form elements with the same name
, they'll override each other. PHP is only respecting the last input with that name, which is probably blank, and is ignoring the earlier one you filled in.
You can look at the PHP manual on multiple file uploads, but the upshot is that you need to have []
at the end of the input name if you want PHP to "see" all of them and organize them into an array for you. Otherwise, have only one input, or just pick different names for each.