Hi everyone.
I'm trying to verify whether the variables $username and $password_recovery (both are unique - impossible for them to be the same) both come from the same row in the rable 'users'. This is the query I am using:
return (mysql_result(mysql_query("SELECT COUNT(`user_id`) FROM `users` WHERE `username` = '$username' AND `recover_password` = $recover_password"), 0) == 1) ? true : false;
(yes I know mysql_* functions are out of date, being depreceated etc). I am trying to get the query to return either true or false, but I am getting this error:
Warning: mysql_result() expects parameter 1 to be resource, boolean given in on line 20 (line of the query).
Any ideas? Thanks!