What are common errors in the $_FILES array that may result in only one file being recognized and uploaded?

One common error in the $_FILES array that may result in only one file being recognized and uploaded is using the same name attribute for multiple file inputs in a form. To solve this issue, ensure that each file input in the form has a unique name attribute.

<form method="post" enctype="multipart/form-data">
    <input type="file" name="file1">
    <input type="file" name="file2">
    <input type="submit" value="Upload">
</form>