What are common mistakes to avoid when handling multiple file uploads in PHP forms?

Common mistakes to avoid when handling multiple file uploads in PHP forms include not setting the "enctype" attribute of the form to "multipart/form-data", not checking if files were successfully uploaded before processing them, and not handling file upload errors properly.

<form action="upload.php" method="post" enctype="multipart/form-data">
    <input type="file" name="files[]" multiple>
    <input type="submit" value="Upload">
</form>
```

```php
if(isset($_FILES['files'])){
    $errors= array();
    foreach($_FILES['files']['tmp_name'] as $key => $tmp_name ){
        $file_name = $_FILES['files']['name'][$key];
        $file_size =$_FILES['files']['size'][$key];
        $file_tmp =$_FILES['files']['tmp_name'][$key];
        $file_type=$_FILES['files']['type'][$key];
        
        if($file_size > 2097152){
            $errors[]='File size must be less than 2 MB';
        }
        
        if(empty($errors)==true){
            move_uploaded_file($file_tmp,"uploads/".$file_name);
        }else{
            print_r($errors);
        }
    }
}