I’m trying to make a very simple query:
$.ajax({
url: "ajaxfunc.php",
dataType: 'json',
success: function(data){
alert(data.resp);
}
});
And in ajaxfunc.php I have
<?php echo json_encode(array("resp"=>"1")); ?>
But for a strange reason data is always null and data.resp is undefined.
Where can be the problem?
i got this working in my system.
b.php