title: $_POST variable empty after AJAX Request
body: <p>I've seen a lot of posts on this issue, but many of them are at least 3 years old, and nothing seemed to resolve my issue. I'm hoping someone can help. I created an array of strings that are paths to files on a server. I want to pass that array to a PHP file to unlink the specified files. The problem is when I pass the array to the PHP file using jQuery's ajax() function, the $_POST variable is empty so I can't do anything with the data. The URL is good and the array has a length of 1 in this example. Here is my code:</p>
  
  <p>jQuery</p>
  
  <pre><code>$(".remove").click(function() {
      var images = document.getElementsByTagName('img');
      var images2remove = [];
  
      $(images).each(function() {
          if($(this).hasClass('highlight')) {
              var path = $(this).attr('src');
              images2remove.push(path);
          }
  
      })
  
          $.ajax({
          url: 'removeFiles.php',
          type: 'post',
          data: {images : images2remove},  
          contentType: false,
          processData: false,
          success: function(response) {
              if(response != 0) {
                console.log(response);
              }
              else {
                  alert('file not removed');
              }
          }
      })
  });
  
  </code></pre>
  
  <p>And my php</p>
  
  <pre><code>$images = $_POST['images'];
  var_dump($images);  // returns array(0){}
  
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>$post = file_get_contents('php://input'); 
  var_dump($post) // returns string(15) [object, Object] 
  
  </code></pre>
  
  <p>I'm not quite sure what to do with that. Based on examples I have seen I feel I should be able to access the contents of this array using the $_POST variable. What am I missing here? Thanks as always! </p>