0
<form action = "uploadFile.php" method= "POST"  enctype = "multipart/form-data">
      <input type = "file" name = "file[]"><br><br>
      <input type = "file" name = "file[]"><br><br>
      <input type = "submit" value = "Submit">
</form>


Is it possible to upload more than one file at the same time with just a click on the submit button?
I am having this problem of figuring out what to do as to uploading multiple files at the same time? Any idea please?

Edited by pritaeas: moved

2
Contributors
2
Replies
17
Views
2 Years
Discussion Span
Last Post by erabxes
0

The code you have there will upload 2 files. The resultng array %_FILES['files'] that is posted will contain them both.
What exactly are you having trouble with?
Something to remember is that PHP has a config setting MAX_FILE_UPLOADS (since PHP 5.2 I think) that specifies the maximum number of files can be uploaded in one go.

0

I initially had the issue, or problem of choosing how to go about uploading the respective files! I first thought that maybe I should upload them individually, but I have already resolved how to go about it. Uploading all the files at a go will be better and then capturing the error for any failed file was the final means I employed.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.