Advertisement
Guest User

Save User Secure

a guest
Jan 21st, 2020
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. function saveUser(){
  2.     $username = $this->input->post('username');
  3.     $password = $this->input->post('password');
  4.     $secure   = password_hash($password, PASSWORD_DEFAULT);
  5.     $data     = [
  6.         'username' => $username,
  7.         'password' => $password,
  8.     ];
  9.     $this->load->model('model');
  10.     $save = $this->model->saveUser('user',$data);
  11.     if($save){
  12.         redirect(SUCCESS_URL);
  13.     }else{
  14.         redirect(FAILED_URL);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement