Last Updated: February 25, 2016
·
685
· marlonlandaverde

Sending POST AJAX data to PHP. Where does it go?

In building an AJAX application with a PHP Backend, I had the hardest time figuring out where the data that I was sending was ending up and how could I access it in PHP. For the world to know, here's where it goes:

$_REQUEST['data'] = $_POST['data'] = {JSON data...woooo......};

This is assuming you JSON.stringify the data sent. If not, you might not receive any data.