Is there a way to input a folder path for uploading files in PHP similar to using <input type="file" name="file"> for single files?

When uploading multiple files in PHP, you can use an array-like notation in the input field name to handle multiple files. By using <input type="file" name="files[]">, you can allow users to select multiple files for upload. In the PHP code, you can access these files as an array in the $_FILES superglobal.

&lt;form method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
    &lt;input type=&quot;file&quot; name=&quot;files[]&quot; multiple&gt;
    &lt;input type=&quot;submit&quot; value=&quot;Upload&quot;&gt;
&lt;/form&gt;

&lt;?php
if(isset($_FILES[&#039;files&#039;])){
    $files = $_FILES[&#039;files&#039;];

    foreach($files[&#039;name&#039;] as $key =&gt; $name){
        $tmp_name = $files[&#039;tmp_name&#039;][$key];
        $destination = &#039;upload/&#039; . $name;
        move_uploaded_file($tmp_name, $destination);
    }
}
?&gt;