Ajax value & nbsp; $. ajax ({& nbsp; type: & nbsp; "post", & nbsp; url: & nbsp; "ddd. php ", & nbsp; & nb ajax values
$. Ajax ({
Type: "post ",
Url: "ddd. php ",
Data: {"inserted": [{"productionName": "Air Compressor", "product": "Khing", "productionType": "KX-11D", "fenjieselect ": "decomposition", "proctionNO": "02" },{ "productionName": "Air Compressor", "product": "Khing", "productionType": "KX-12D ", "fenjieselect": "decomposition", "proctionNO": "03"}], "updated": [], "deleted": []},
Datatype: "text ",
Success: function (data ){
Alert (data );
}
})
How can I obtain the values of inserted, updated, and deleted in PHP in the background?
------ Solution --------------------
Didn't you write POST for receiving? Print_r ($ _ POST) In ddd. php)
------ Solution --------------------
If ($ _ POST ){
Print_r ($ _ POST );
Exit;
}
?>
Script
Script
$ (Function (){
$. Ajax ({
Type: "post ",
// Url: "ddd. php ",
Data: {"inserted": [{"productionName": "Air Compressor", "product": "Khing", "productionType": "KX-11D", "fenjieselect ": "decomposition", "proctionNO": "02" },{ "productionName": "Air Compressor", "product": "Khing", "productionType": "KX-12D ", "fenjieselect": "decomposition", "proctionNO": "03"}], "updated": [], "deleted": []},
Datatype: "text ",
Success: function (data ){
Alert (data );
}
});
});
Script