Hi iam using twilio to send and receive SMS from my customers. The sending SMS works fine.
When a SMS is received i want to save from, Body to my database.its not working. Here is my code.
Controller
function receive(){
$post_data['from'] = $this->input->post('From');
$post_data['body'] = $this->input->post('Body');
if($post_data['from'] && $post_data['body']){
$this->receive->insert_received_message($post_data);
}
}
Model
function insert_received_message($data){
$sms['pone_number'] = $data['from'];
$sms['message_type'] = 2;
$sms['body'] = $data['body'];
$results = $this->db->insert('Sms_message', $sms);
return $results;
}
I added the url to my number like this

Error message in Received log

Can someone help me to fix this. TNX.
Your data is not save into database make sure your filed name is correct in your array
Controller
Model
The following link also demonstrates how to interact with messages received.
https://www.twilio.com/docs/quickstart/php/sms/replying-to-sms-messages