Okay, I'm getting confused now.
if I do this:
SELECT user_id
FROM hs_auth_user
WHERE user_id = 4 AND user_password = '44fsdsd'
I can login.
If I do like this:
SELECT user_id
FROM hs_auth_user
WHERE user_id = '$userid' AND user_password = '$password'
I can login.
But only if the password is not 'encrypted' in the database, it is in clear text.
Now if I use:
SELECT user_id
FROM hs_auth_user
WHERE user_id = '$userid' AND user_password = PASSWORD('$password')
and the password has been encrypted with the PASSWORD function i phpMyadmin, it is not working anymore.