PHP function not returning any data to JQuery ajax method
问题 I am using jquery's ajax method to post some data to the server and get back the response. Though the server side php code is returning a json encoded string/array, the response is coming back as null. Could someone point out the mistake that I am making. Below if my jquery ajax method using which I am hitting the postData.php page. $.ajax({ url:'postData.php', type:'POST', data:data, dataType: "json", success: function(response){ console.log(response); } }); The content in postData.php is