I have this form to upload multiple images to my gallery:
HTML code
<form method="POST" enctype="multipart/form-data" action="gallery.php?action=upload&folder=1">
<input type="file" name="images[]" multiple />
<input type="submit" />
</form>
PHP code
$upl_count = count($_FILES['images']);
echo "Uploaded $upl_count images.";
No matter what I upload, $upl_count is always 5, and if I iterate over the files the following way:
PHP code
$images = $_FILES['images'];
foreach ($images as $file => $name)
{
echo $images['type'][$file];
}
... the type is always empty. Nothing is echoed in the latter part. What am I missing here? Could it be an encoding problem?