I am trying to post multiple files from a HTML form to a php page for processing but I always seem to end up with an array that is either 0, 5 or something else, but not the number of files I uploaded...
This is the post form...
Code: Select all
<form method="post" action="process.php" enctype="multipart/form-data">
<div>
<input type="file" name="upload[]" /><BR>
<input type="file" name="upload[]" /><BR>
<input type="file" name="upload[]" /><BR>
<input type="file" name="upload[]" /><BR>
<input type="submit" value="Upload Ad " />
</div>
</form>
</div>
</body>
</html>
Code: Select all
$uploads = count ($_FILES ['upload'] ['name']);
If I add two files in the form I get 14 as the $uploads...
What am I missing?
I don't seem able to get the number of files I posted from that page at all...
Any help would be appreciated, I am sure the answer is simple, but it is driving me crazy
Thanks