Advertisement
game8037

[perpus] login

May 13th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public function index($status = "0"){
  2. if ($this->input->post('btnsubmit')) {
  3. $username = $this->input->post('username');
  4. $password = $this->input->post('password');
  5. $cek = $this->M_user->login($username,$password);
  6. if($cek){
  7. $this->session->set_userdata("id",$cek->userid);
  8. $this->session->set_userdata("error",false);
  9. $this->session->set_userdata("welcome",TRUE);
  10. redirect("welcome");
  11. }
  12.  
  13. $this->session->set_userdata("error","Username / Password yang anda masukan salah");
  14. }
  15.  
  16. $data["status"] = $status;
  17. $this->load->view("page/login",$data);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement