0

I use html5 multiple tag

<input class="file" type="file" id="files1" name="files[]" multiple />

and my php can handle only for 1 file each time

move_uploaded_file($_FILES['SelectedFile']['tmp_name'], 'images/uploaded/' . $_FILES['SelectedFile']['name'])

how to process if users use ctrl and select multiple file and click upload? I think I have to separate 2 logic to process? because the user can select 1 by 1 as well.

user3346088
  • 109
  • 1
  • 7
  • Use a loop to go through them. – Mattt Mar 05 '14 at 01:38
  • Try it. Upload multiple small files (like a bunch of 1-byte text files), then do `var_dump($_FILES)`, and you'll see what you need to do. – Marc B Mar 05 '14 at 01:38
  • 3
    possible duplicate of [Multiple file upload in php](http://stackoverflow.com/questions/2704314/multiple-file-upload-in-php) – tozlu Mar 05 '14 at 01:38

0 Answers0