title: PHP - retrieve ajax posted json object in PHP
body: <p>I'm using this function to send json to a php page:</p>
  
  <pre><code>function update_records(data) {
      data = data;
      $.ajax({
          type: 'POST',
          cache: false,
          timeout: 2000,
          contentType: 'application/json',
          url: 'update.php',
          data: data, //'data='+data+'&amp;aid=0',
          success: function() {
              success_message('success');
          },
          error: function(){
              failure_message('failure');
          }
      }); 
  </code></pre>
  
  <p>In firebug I can see the posted data: </p>
  
  <pre><code>[{
      "postid": 66,
      "values": [
          "field_key=a",
          "oldvalue=b",
          "newvalue=c dad"
      ]
  }]
  </code></pre>
  
  <p>On my php page how can I <code>$_REQUEST</code> the object? Or am I doing it all wrong?</p>