Welcome Guest, Not a member yet? Register   Sign In
trying to check username and password in database
#1

[eluser]Unknown[/eluser]
hello,
i am trying to check username and password from db but i am getting this error " Parse error: parse error in \application\models\loginusermodel.php on line 14"
my code for model is:-
$this -> db -> select(' UserName, Password');
7 $this -> db -> from('users');
8 $this -> db -> where('UserName = ' . "'" . $this->input->post(UserName) . "'");
9 $this -> db -> where('Password = ' . "'" . $$this->input->post(UserPass) . "'");
10 $this -> db -> limit(1);
11
12 $query = $this -> db -> get();
13
14 if($query -> num_rows() == 1)
15 {
16 return $query->result();
17 }
18 else
19 {
20 return false;
21 }

thanks,




Theme © iAndrew 2016 - Forum software by © MyBB