Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. public function masuk(){
  2. if(!$this->input->is_ajax_request()) show_404();
  3. echo $this->input->post('email'); exit;
  4. $this->load->model('logbook_model', 'm_logbook');
  5. $this->load->model('user_model', 'm_user');
  6. $this->load->library('form_validation');
  7. $email = trim($this->input->post('email'));
  8. //$email = trim($this->input->post('email', TRUE));
  9. $cek = $this->m_user->get_user_by_email($email);
  10. if($cek->num_rows() > 0):
  11. redirect('home');
  12. $result['error'] = FALSE;
  13. $result['data'] = $cek->row();
  14. else :
  15. //redirect('home');
  16. $result['error'] = TRUE;
  17. $result['message'] = $email;
  18. endif;
  19.  
  20. $this->output
  21. ->set_content_type('application/json')
  22. ->set_output(json_encode($result));
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement