Welcome Guest, Not a member yet? Register   Sign In
display error by function
#1

hi in my model i have this function :

Code:
    function login($email,$passwrd){
       
       $this->db->where('email', $email);
       $q = $this->db->get('users')->row();
       
       if($q->num_rows()!=0){
           if ($q->password_hash==$passwrd){
               $_SESSION['user_id']=$q->id;
           } else {
               $errors[]='Password error'  ;
         
           }
       }
       else{
           $errors[]='Username error'  ;
       }
       

       
    }
     


HOw can i show error in view ?
Reply


Messages In This Thread
display error by function - by pippuccio76 - 06-15-2017, 02:45 PM
RE: display error by function - by donpwinston - 06-15-2017, 04:59 PM
RE: display error by function - by pippuccio76 - 06-16-2017, 04:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB