sh1fralf4tih

ajax con

Dec 24th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1. public function Register()
  2.     {
  3.         $nmtoko = $this->input->post('nmtoko');
  4.         $password = $this->input->post('nmtoko');
  5.  
  6.         $error = FALSE;
  7.         $error_message = FALSE;
  8.         $url = "";
  9.  
  10.         $ceknors = $this->db->get_where('kjnt_outlet', array('NORS' => $this->input->post('nors')));
  11.         if($ceknors->num_rows() > 0)
  12.         {
  13.             $nors = $this->input->post('nors');
  14.         }else
  15.         {
  16.             $error = $error_message = "NO RESELLER TIDAK ADA";
  17.         }
  18.  
  19.         $cekdigiposid = $this->db->get_where('kjnt_outlet', array('DIGIPOS_ID' => $this->input->post('digiposid')));
  20.  
  21.         if ($cekdigiposid > 0)
  22.         {
  23.             $digiposid = $this->input->post('digiposid');
  24.         }else
  25.         {
  26.             $error = $error_message = "DIGIPOS ID TIDAK ADA";
  27.         }
  28.  
  29.         $result = array(
  30.             'error' => $error === FALSE ? TRUE : FALSE,
  31.             'error_message' => $error_message
  32.         );
  33.  
  34.         echo json_encode($result);
  35.     }
Advertisement
Add Comment
Please, Sign In to add comment