Multiple File Input in HTML

File inputs can have an attribute of "multiple" which then allows multiple files to be selected in the file section dialog box. Currently only Firefox 3.6+ and WebKit browsers are supporting it.

[View All Snippets]
Show Plain Text »
  1. <form action="upload.php" method="post" enctype="multipart/form-data">
  2.   <input name="upload_files[]" type="file" multiple>
  3.   <input type="submit" value="Upload">
  4. </form>
  6. <?php
  7. // PHP code that shows how to loop through the data as an array
  8. foreach($_FILES["upload_files"]["name"] as $file){
  9.    echo "<li>".$file."</li>";
  10. }
  11. ?>
Create Your Free Account
Please remember that this information is essential to use our services correctly.
After creating the account you will be able to download all of our FREE products.
Fields marked with * are mandatory

Please send me information about updates, new products, specials and discounts from ApPHP!
We recommend that your password should be at least 6 characters long and should be different from your username/email. Please use only letters of the English alphabet to enter your name.

Your e-mail address must be valid. We use e-mail for communication purposes (order notifications, etc). Therefore, it is essential to provide a valid e-mail address to be able to use our services correctly.

All your private data is confidential. We will never sell, exchange or market it in any way. Please refer to Privacy Policy.

By clicking "Create Account", you are indicating that you have read and agree to the ApPHP Terms & Conditions.

Quick Registration with: Facebook / Google