I have my front end script which has the following jQuery code:
$.get("/backend/post.php", {
title: title,
message: post,
stick: sticky
}, function (output) {
alert("Call Back");
}
}, "json");
stick is a boolean value, the other two are strings. I've confirmed that they are in fact set. Now on the backend page, using $_GET, title and, message and being passed, but $_GET['stick'] is returning empty, and the PHP function gettype() is telling me it is NULL.
In request to one of the comments:
sticky comes from a form, it's a check box and I just select it with this code:
var sticky = $("input[name=sticky]").attr('checked');
When I use alert() to output the value of sticky, it will return true/false depending on what was selected.
Why is this boolean value not being passed? The JSON site tells me you can have the boolean values true/false in it. But it is not working here for some reason.