If you have a reasonable maximum limit on the number of files, it is probably better to include this many fields for uploading files in a static form, and then use JavaScript to hide the redundant ones than creating them all dynamically. Then the form can work when JavaScript is not available.
Side note: technically separate forms for uploading HTML files are already several forms for uploading files. According to the HTML form encoding standard, you need to be able to select multiple files in the Browse dialog box, and they will be presented as a multi-component / mixed MIME structure.
However, it practically does not support anything. Older versions of Opera work on the client side (and, I think, an ancient test browser of some kind, possibly Viola) and several components for parsing text on the server side, but not built-in PHP. In any case, the user interface is not very convenient, so you are missing a lot.
source share