I use the following code to send a request:
var ajaxHandler = new XMLHttpRequest();
ajaxHandler.onreadystatechange = function()
{
if(ajaxHandler.readyState == 4)
{
console.log(ajaxHandler.responseText);
}
}
ajaxHandler.open("POST", "filterCards", true);
ajaxHandler.send("category="+category+"&tag="+tag);
On the PHP side, I have the following:
var_dump($_POST);
However, although both category and tag variables have values, the console registers an empty array. What am I doing wrong with the message?
source
share