I have been trying to retrieve JSON data from my php file.Its giving me a hard time.This is my code
Code in my VIEW:
var productDetails = {\'id\':ISB
You only have your own answer.
print_r($_POST);
Return :
Array ( [id] => 234 [qty] => 1 [price] => 0.00 [name] => dasdadsd2q3e!@!@@ )
Then how will you get : echo $id = $this->input->post('productDetails');
echo $id = $this->input->post('productDetails');
You will get id by echo $id = $this->input->post('id');
echo $id = $this->input->post('id');