How to use getJSON, sending data with post method?

The $.getJSON() method does an HTTP GET and not POST. You need to use $.post() $.post(url, dataToBeSent, function(data, textStatus) { //data contains the JSON object //textStatus contains the status: success, error, etc }, “json”); In that call, dataToBeSent could be anything you want, although if are sending the contents of a an html form, you … Read more

Error handling in getJSON calls

$.getJSON() is a kind of abstraction of a regular AJAX call where you would have to tell that you want a JSON encoded response. $.ajax({ url: url, dataType: ‘json’, data: data, success: callback }); You can handle errors in two ways: generically (by configuring your AJAX calls before actually calling them) or specifically (with method … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)