title: AJAX data returns empty
body: <p>I have the code at the bottom that get's a name from a hidden input type, and I want to send that to a php page but the ajax data returns empty. The console.log on line 4 returns the value, but the console.log on the bottom returns empty. I tried changing the way I assign data inside the ajax call according to <a href="https://stackoverflow.com/questions/12607500/jquery-ajax-post-data-is-empty-on-the-server-for-some-clients">this article</a> but this didn't change anything. Any ideas?</p>
  
  <pre><code>$('.uploadImage input[name="userImage"]').on("change", function(){
      var image = new FormData($('input[name="userImage"]')[0].files[0]);
      var name = $('.hidden').attr("name");
      console.log(name);
      $.ajax({
          type: "POST",
          url: "includes/ajax-image.php",
          processData: false,
          data: name,
          success: function(data){
              console.log(name);
          }
      });
  });
  </code></pre>
  
  <p>ajax-image.php</p>
  
  <pre><code> &lt;?php
  $name = $_POST["name"];
  $dir = ("../user_img/".$name."");
      if (!file_exists($dir)) {
          mkdir($dir,0700);         
      }
   ?&gt;
  </code></pre>
  
  <p>I added the ; at that line</p>
  
  <p>Feel free to edit both of my code's, I really don't have and idea what to do next</p>