title: Send image and text with ajax
body: <p>I'm using javascript's 'formData' to send image files with ajax. How can I attach other data to formData, for example a text string? </p>
  
  <p>JS:</p>
  
  <pre><code>$("#post-image").click(function(){
      $.ajax({
          url: "../../build/ajaxes/upload-photo.php",
          type: "POST",
          data: formdata,
          processData: false,
          contentType: false,
          success: function (response) {
              console.log(response);
          }
      });
  });
  </code></pre>
  
  <p>PHP:</p>
  
  <p>In my PHP I can access the image by using <code>$_FILES["images"]</code>. I don't know what to use for my additional data passed with formdata. </p>