title: Getting an ajax post data in php
body: <pre><code>$.ajax({
      url: '/gateway/',
      type: 'POST',
      data: {test : 'test'},
      dataType: 'json',
  }).done(function(){
      console.log('done');
  });
  </code></pre>
  
  <p>Above is my AJAX post, below is my PHP:</p>
  
  <pre><code>var_dump($_POST['test']);
  die();
  </code></pre>
  
  <p>The problem is, this fails to work (I get a NULL value) - why?</p>
  
  <p>I know my call is getting to the PHP code as I can dump any old string:</p>
  
  <pre><code>var_dump('hello');
  die();
  </code></pre>
  
  <p>Where am I going wrong?</p>