This piece of jQuery code posts to one of our php pages.
var json = '{"object1":{"object2":[{"string1":val1,"string2":val2}]}}';
$.post("phppage", json, function(data) {
alert(data);
});
Inside phppage, I have to do some processing depending on the post data. But I am not able to read the post data.
foreach ($_POST as $k => $v) {
echo ' Key= ' . $k . ' Value= ' . $v;
}