Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function masuk(){
- $username = $this->input->post('username');
- $password = md5($this->input->post('password'));
- $cek = $this->user->cek($username,$password);
- if ($cek->num_rows() == 1) {
- $this->db->select('u.id, u.username, u.password, ud.f_name, ud.l_name');
- $this->db->from('user u');
- $this->db->join('user_detail ud', 'u.username = ud.username', 'inner');
- $this->db->where('u.username', $username);
- $data = $this->db->get()->row_array();
- $data['is_logged_in'] = true;
- $this->session->set_userdata($data);
- redirect('dashboard','refresh');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement