I am loggin in user. So after entring email and password by user then I want to check whether user with that email and password exist. For this reason I am using where clause twice but somehow it is not working. Perhaps because I am using it incorrectly. How can I fix my below code
$this->db->where('email', $this->input->post('email'));
$this->db->where('password', $pass . $salt);
The where is working fine, it’s the second where that is wrong, you’re passing the password + the salt but you aren’t encoding anything, just concatenating them. So if your password is bob and your salt is pepper you’re passing bobpepper as the password field to the query.
Depending on the encryption your code should look similar to this: