I know that we already have a lot of questions about this error, but I can’t fix my code, so anyone here, please help me fix this problem. my code is like this
function login($username, $password) { $user_id = user_id_from_username($username); $username = sanitize ($username); $password = md5 ($password); return (mysql_result(mysql_query("SELECT COUNT (`user_id`) FROM `users` WHERE `username` = '$username' AND `password` = '$password'"),0)==1) ? $user_id : false;
I look forward to hearing from you guys. I am new to this, so please keep your answer as simple as possible. thanks.
source share