I have a problem with post data in jquery
This is my code:
$.ajax({
cache: false,
type: "POST",
url: '<?=base_url();?>cart/add_product1',
async: false,
data: {
job_id: item.job_id,
quantity: item.quantity,
price: item.price,
media_code: item.media_code,
product_id: item.layout_code,
product_name: item.product_name,
reedit_url: item.reedit_url,
thumb_url: item.thumb_url
},
success: function (response, textStatus, jqXHR) {
console.log('done!');
},
error: function (jqXHR, textStatus, errorThrown) {
console.log("The following error occured: " + textStatus, errorThrown);
}
})
I tried many thing, like add cache: flase, and added timestamp to the link but the problem is still
The code is work good in the other browsers
The code for the add_product1 function is:
public function add_product1 ()
{
print_r($_POST);
}
But the result is : Array()
Your help please
Thank you