title: JQuery/PHP multiple files one at a time with only one input field
body: <p>I search through the net but didn't find much things on my problem. Hope someone here can help!
  As i write in the title I want to upload mutliple files, one at a time, with only one input.
  I tried to do this using JQuery as you can see below, but obviously it doesn't work!
  Anyone can help, please?</p>
  
  <pre><code>    &lt;!doctype html&gt;
      &lt;html&gt;
      &lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
      &lt;head&gt;
      &lt;script&gt;
      $(document).ready(function() {
          $(document).on('change', '.file',function(){
              $('&lt;input type="file" name="file[]" class="file" size="60" /&gt;').appendTo($("#divAjout"));
              $("div input:first-child").remove();    
            return false;
          });
      });
      &lt;/script&gt;
  
      &lt;title&gt;test input file unique pour plusieurs fichiers&lt;/title&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
      &lt;form action="" method="post" enctype='multipart/form-data'&gt;
      &lt;div id="divAjout"&gt;
          &lt;input type="file" name="file[]" class="file" id='file' size="60" /&gt;
          &lt;/div&gt;
  
  
          &lt;input name="submit" type="submit"&gt;
      &lt;/form&gt;
      &lt;?php       if(isset($_POST['submit'])){echo'&lt;pre&gt;'; print_r($_FILES);echo'&lt;pre&gt;';} ?&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>