I send an XMLHttp Request to a PHP server. I cannot get hte $_POST or $_REQUEST object filled with the data I send using Javascript:
var r = new XMLHttpRequest;
r.open("POST", "http://url.com", true);
r.send({ myname : 'someName'});
I cannot access myname property in the $_POST array, though I see in php://input. How should I have it in $_POST as well? I have tried to send the data like this:
r.send(JSON.stringify({ myname : 'someName'}));
But it does neither work.