Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here is the controller part:
- public function processcall($qe='hey',$b='2563355370',$cn='2563355370',$qt='yesno')
- {
- $data['user_id'] = 'userid';
- $data['question'] = $qe;
- $data['b'] = $b;
- $data['cn'] = $cn;
- $data['questiontype'] = $qt;
- $this->load->model('inbox_model',$data);
- $this->inbox_model->insert_entry();
- $this->load->view('call/processcall_view',$data);
- }
- Model
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class Inbox_model extends CI_Model {
- function __construct()
- {
- parent::__construct();
- }
- function insert_entry()
- {
- $this->user_id = $data['user_id'];
- $this->question_type = 'yesno';
- $this->question = 'How are you?';
- $this->answer = 'Yes';
- $this->business_name = 'Silly Goose';
- $this->db->insert('messages', $this);
- }
- }
Add Comment
Please, Sign In to add comment