Return to Snippet

Revision: 62766
at March 11, 2013 17:44 by apphp-snippets

Initial Code
<form action="upload.php" method="post" enctype="multipart/form-data">
  <input name="upload_files[]" type="file" multiple>
  <input type="submit" value="Upload">
// PHP code
 that shows how to loop through the data as an array
foreach($_FILES["upload_files"]["name"] as $file){
    echo "<li>".$file."</li>";

Initial URL

Initial Description
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.

Initial Title
Multiple File Input in HTML

Initial Tags

Initial Language