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.
Written by Marlon Landaverde
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#