Welcome Guest, Not a member yet? Register   Sign In
Parsing argument to model give me error "Undefined property"
#6

[eluser]LexXx[/eluser]
[quote author="InsiteFX" date="1336213438"]
Code:
public function get_user_data($email, $password)
{
  // you do not need $this-> the variables are bassed into the method!
  $this->db->where('email', $email);
  $this->db->where('password', $password);
  $query = $this->db->get('users');
  
  if($query->num_rows == 1)
  {
   foreach($query->result() as $row)
   {
    $data[] = $row;
   }
   return $data;
  }
}

public function check_user($username, $password)
{
  $username_to_check = $username;
  $password_to_check = $password;
  // go to search in db we have 2 vars

}
[/quote]

Thats solved my problem ty so much.


Messages In This Thread
Parsing argument to model give me error "Undefined property" - by El Forum - 05-05-2012, 07:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB