Hi all,
I'm sending a JSON object to PHP using jQuery via
$.ajax({
url: myURL,
type: 'POST',
contentType: "application/json; charset=utf-8",
data: myData,
processData: false,
dataType: 'html',
async: false,
success: function(html) {
window.console.log(html);
}
});
and trying to decode the JSON object using
$GLOBALS["HTTP_RAW_POST_DATA"];
but the contents of variable are printed as
[object Object]
with json_decode() returning NULL (of course).
Any ideas what I need to do to get the at the actual JSON data?
Thanks, Gaz.