drzeo

controller tambah

Nov 10th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. public function tambah()
  2.     {
  3.         $uri = $this->uri->segment(4);
  4.         $this->_validate();
  5.         $data = array(
  6.             'pertanyaan' => $this->input->post('pertanyaan'),
  7.             'a' => $this->input->post('a'),
  8.             'b' => $this->input->post('b'),
  9.             'c' => $this->input->post('c'),
  10.             'd' => $this->input->post('d'),
  11.             'e' => $this->input->post('e'),
  12.             'jawaban' => $this->input->post('jawaban'),
  13.             'kode_soal' => $uri
  14.            
  15.         );
  16.         $this->DButama->AddDB($this->table,$data);
  17.         echo json_encode(array("status" => TRUE));
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment