Ok. Here is a little test form I created:
HTML Code:
<form enctype="multipart/form-data" action="test.php" method="post">
<input type="file" name="photos[ ]"><br>
<input type="file" name="photos[ ]"><br>
<input type="file" name="photos[ ]"><br>
<input type="file" name="photos[ ]"><br>
<input type="submit">
</form>
Here is the code to display the file names:
PHP Code:
$photos = $_POST['photos'];
foreach ($photos as $s) {
echo "$s<br />";
}
With the enctype in the form tag, it returns nothing. Without, it displays the file names.
Bookmarks