title: xmlhttprequest request sent, but code not executed?
body: <p>So, I am using a jQuery Upload-Script i've downloaded on the WWW.</p>
  
  <p>This is my JavaScript code:</p>
  
  <pre><code>$(document).ready(function()
                  {
                      var settings = {
                          url: "upload.php",
                          method: "POST",
                          allowedTypes:"pdf,xls,doc,docx,xlsx",
                          fileName: "name",
                          multiple: true,
                          onSuccess:function(files,data,xhr)
                          {
                              $("#status").html("&lt;font color='green'&gt;Upload is successed&lt;/font&gt;");
  
                          },
                          onError: function(files,status,errMsg)
                          {
                              $("#status").html("&lt;font color='red'&gt;Upload is failed: " + errMsg + "&lt;/font&gt;");
                          },
                          showDelete:true,
                          deleteCallback: function(data,pd)
                          {
                              for(var i=0;i&lt;data.length;i++)
                              {
                                  $.post("delete.php",{op:"delete",name:data[i]},
                                      function(resp, textStatus, jqXHR)
                                      {
                                          //Show Message
                                          $("#status").html("&lt;font color='red'&gt;File deleted.&lt;/font&gt;");
                                      });
                              }
                              pd.statusbar.hide(); //You choice to hide/not.
  
                          }
                      };
                      $("#mulitplefileuploader").uploadFile(settings);
  
                  });
  </code></pre>
  
  <p>And this is my "upload.php":</p>
  
  <pre><code>&lt;?php
  include_once("_assets/_pages/db.php");
  
  $output_dir = "_files/";
  if(isset($_FILES["myfile"]))
  {
      $ret = array();
  
      $error = $_FILES["myfile"]["error"];
      //You need to handle  both cases
      //If Any browser does not support serializing of multiple files using FormData()
      if(!is_array($_FILES["myfile"]["name"])) //single file
      {
          $fileName = $_FILES["myfile"]["name"];
          move_uploaded_file($_FILES["myfile"]["tmp_name"],$output_dir.$fileName);
          $ret[]= $fileName;
          $sql = 'INSERT INTO `Files` (FileName, UploadDate, DownloadCount) VALUES ($filename, CURRENT_TIMESTAMP, 0)';
          $db-&gt;query($sql);
      }
      else  //Multiple files, file[]
      {
          $fileCount = count($_FILES["myfile"]["name"]);
          for($i=0; $i &lt; $fileCount; $i++)
          {
              $fileName = $_FILES["myfile"]["name"][$i];
              move_uploaded_file($_FILES["myfile"]["tmp_name"][$i],$output_dir.$fileName);
              $ret[]= $fileName;
              $sql = 'INSERT INTO `Files` (FileName, UploadDate, DownloadCount) VALUES ($filename, CURRENT_TIMESTAMP, 0)';
              $db-&gt;query($sql);
          }
  
      }
      echo json_encode($ret);
  }
  ?&gt;
  </code></pre>
  
  <p>My upload.php is not putting the file into "_files/", nor inserting anything into my databse?
  What am I doing wrong?</p>
  
  <p>Other question: do you recommand any other well-designed (bootstrap-friendly) jQuery File-Upload handlers?</p>