ajax php data code example
Example 1: ajax php
$.ajax({
type: "POST",
url: "event.php",
data:"action=chnageChart&value1="+id,
cache: false,
success: function(html){
window.location.reload();
}
});
Example 2: ajax jquery php
$.ajax({
url : "file.php",
method : "POST",
data: {
//key : value
action : action ,
key_1 : value_key_1,
key_2 : value_key_2
}
})
.fail(function() { return false; })
// Appel OK
.done(function(data) {
console.log(data);
});