Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function saveUser(){
- $username = $this->input->post('username');
- $password = $this->input->post('password');
- $secure = password_hash($password, PASSWORD_DEFAULT);
- $data = [
- 'username' => $username,
- 'password' => $secure,
- ];
- $this->load->model('model');
- $save = $this->model->saveUser('user',$data);
- if($save){
- redirect(SUCCESS_URL);
- }else{
- redirect(FAILED_URL);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement