Im doing the following ajax call:
$(\'#save_sale\').click(function() {
var save_sale = 1;
$.ajax({
type: \'GET\',
url: \'summary.php\
on your js page
$.ajax({
type: 'GET',
url: 'summary.php',
data: {save_sale: save_sale},
//success: function(data) { /* Do something here?? */ },
error: function(xhr, ajaxOptions, thrownerror) { }
}).success(function(data) {
window.location('addcust.php?new_sale='+data.id)
});
on your php script echo the id
$data['id'] = ;
echo json_encode($data);exit
hope it will work.