title: PHP is not recieving JSON data from jQuery
body: <p>I am trying to use ajaxFIleUpload in my website. I am not recieving JSON data send by JavaScript to PHP. I am stuck at this point. File Uploading is ok but i am not able to recieve any post values. My jQuery function is</p>
  
  <pre><code>$(function() {
  
      $(document).on("submit", "#upload_file", function(e) {
  
          e.preventDefault();
  
          $.ajaxFileUpload({
              url             :base_url + 'payments/uploadPaymentSlip/',
              secureuri       :false,
              fileElementId   :'userfile',
              type        : 'POST',
              data: { paymentFormInputAmount: 'asdasd' },
              success : function (data, status)
              {
                  if(data.status != 'error')
                  {
                      $('#files').html('&lt;p&gt;Reloading files...&lt;/p&gt;');
                      //refresh_files();
                      $('#files').val('');
                  }
                  alert(data.msg);
              },
             dataType: 'json'
          });
  
      });
  });
  </code></pre>
  
  <p>My PHP Function is</p>
  
  <pre><code>function uploadPaymentSlip() {
      $status = "";
      $msg = "";
      $file_element_name = 'userfile';
  
      $status = "error";
      // checking whether json value shows in php or not
      // $_POST['paymentFormInputAmount'] is also not working
      $msg = $_POST['paymentFormInputAmount'];
  
      if ($status != "error") {
          $config['upload_path'] = realpath( APPPATH . '../uploads/paymentSlip' );
          $config['allowed_types'] = 'gif|jpg|png|doc|txt';
          $config['max_size'] = 1024 * 8;
          $config['encrypt_name'] = TRUE;
  
          $this-&gt;load-&gt;library('upload', $config);
  
          if (!$this-&gt;upload-&gt;do_upload($file_element_name)) {
              $status = 'error';
              $msg = $this-&gt;upload-&gt;display_errors('', '');
          }
          else {
              $data = $this-&gt;upload-&gt;data();
              // $file_id = $this-&gt;files_model-&gt;insert_file($data['file_name'], $_POST['title']);
              if($file_id) {
                  $status = "success";
                  $msg = "File successfully uploaded";
              }
              else {
                  unlink($data['full_path']);
                  $status = "error";
                  $msg = "Something went wrong when saving the file, please try again.";
              }
          }
          @unlink($_FILES[$file_element_name]);
      }
  
      echo json_encode(array('status' =&gt; $status, 'msg' =&gt; $msg));
  }
  </code></pre>