jQuery - AJAX - PHP:
Description
jQuery-PHP - is PHP library for work with jQuery JavaScript framework. jQuery-PHP have very similar syntax to javascript.
Initialize
PHP: require jQuery library
require_once 'libraries/jQuery.php'; // many actions // ... // get JSON response jQuery::getResponse();
// do an ajax post request (example) $.ajax({ // AJAX-specified URL url: "http://"+document.domain+"/ajax.php", // JSON type: "POST", data: {}, dataType : "json", // Handle the success event // response parser call (it's requried for work php) success: function(data, textStatus){ return php.success(data, textStatus); } })