Multiple File Input

Submitted by:Andery Smith

Date added:11 February, 2013


File inputs can have an attribute of "multiple" which then allows multiple files to be selected in the file section dialog box.

Tags: file input

Code Snippet:

<-- HTML Code : -->

<form method="post" action="upload.php" enctype="multipart/form-data">
<input name='uploads[]' type="file" multiple>
<input type="submit" value="Send">

<-- PHP Code : -->

foreach ($_FILES['uploads']['name'] as $filename) {
echo '<li>' . $filename . '</li>';