Created
June 4, 2014 09:49
-
-
Save voku/b6637c279903848157bc to your computer and use it in GitHub Desktop.
multiple file input: File inputs can have an attribute of "multiple" which then allows multiple files to be selected in the file section dialog box. Firefox 3.6+ and WebKit browsers only are supporting it so far. Unfortunately the "multiple files" need to be within the same folder, as there is no interface for selecting one, moving folders, and …
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="post" action="upload.php" enctype="multipart/form-data"> | |
<input name='uploads[]' type="file" multiple> | |
<input type="submit" value="Send"> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach ($_FILES['uploads']['name'] as $filename) { | |
echo '<li>' . $filename . '</li>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment