I'm using 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 this:
var_dump($_POST);
However, even though both the variables of category and tag have values, the console logs an empty array. What am I doing wrong with the post?