Guest User

Untitled

a guest
Jun 25th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. Here is the controller part:
  2.  
  3. public function processcall($qe='hey',$b='2563355370',$cn='2563355370',$qt='yesno')
  4. {
  5. $data['user_id'] = 'userid';
  6. $data['question'] = $qe;
  7. $data['b'] = $b;
  8. $data['cn'] = $cn;
  9. $data['questiontype'] = $qt;
  10. $this->load->model('inbox_model',$data);
  11. $this->inbox_model->insert_entry();
  12. $this->load->view('call/processcall_view',$data);
  13. }
  14.  
  15.  
  16. Model
  17.  
  18.  
  19. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  20.  
  21. class Inbox_model extends CI_Model {
  22.  
  23. function __construct()
  24. {
  25. parent::__construct();
  26. }
  27. function insert_entry()
  28. {
  29. $this->user_id = $data['user_id'];
  30. $this->question_type = 'yesno';
  31. $this->question = 'How are you?';
  32. $this->answer = 'Yes';
  33. $this->business_name = 'Silly Goose';
  34.  
  35. $this->db->insert('messages', $this);
  36. }
  37. }
Add Comment
Please, Sign In to add comment