title: How to pass (new FormData(this)) with another parameter but i didn't get in upload.php
body: <p>Below is my Code JS code, i want to pass comment parameter to ajax with FormData. Kindly help me to get this one. I have tried to create my_object and added form object and comment hi, but i am not able to get data in upload.php.</p>
  
  <pre><code>$(document).ready(function (e) {
      $("#uploadForm").on('submit',(function(e) {
          e.preventDefault();
          var myData = new FormData(this);
          console.log(myData);
          //var formObj=new FormData(this);
          //var my_object = {"form": formObj, "comment":"hi"};
          $.ajax({
              url: "upload.php",
              type: "POST",
              data: new FormData(this),
              //data:my_object,
              contentType: false,
              cache: false,
              processData:false,
              success: function(data)
              {
              $("#targetLayer").html(data);
              },
              error: function() 
              {
              }           
         });
      }));
  });
  </code></pre>
  
  <p><strong>I want to pass the comment parameter?</strong>
  Below is my PHP code. upload.php</p>
  
  <pre><code>if(is_array($_FILES)) {
  if(is_uploaded_file($_FILES['userImage']['tmp_name'])) {
  $sourcePath = $_FILES['userImage']['tmp_name'];
  $targetPath = "images/".$_FILES['userImage']['name'];
  if(move_uploaded_file($sourcePath,$targetPath)) {
      print_r($_FILES);
  ?&gt;
  &lt;img class="image-preview" width="60" height="80" src="&lt;?php echo $targetPath; ?&gt;" class="upload-preview" /&gt;
  &lt;?php
  }
  }
  }
  </code></pre>