Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function masuk(){
- if(!$this->input->is_ajax_request()) show_404();
- echo $this->input->post('email'); exit;
- $this->load->model('logbook_model', 'm_logbook');
- $this->load->model('user_model', 'm_user');
- $this->load->library('form_validation');
- $email = trim($this->input->post('email'));
- //$email = trim($this->input->post('email', TRUE));
- $cek = $this->m_user->get_user_by_email($email);
- if($cek->num_rows() > 0):
- redirect('home');
- $result['error'] = FALSE;
- $result['data'] = $cek->row();
- else :
- //redirect('home');
- $result['error'] = TRUE;
- $result['message'] = $email;
- endif;
- $this->output
- ->set_content_type('application/json')
- ->set_output(json_encode($result));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement