16.04.2018, 18:04
You might be using strcmp wrong. It can be a very confusing function if you want it to work properly.
I, personally am not a big fan of strcmp.
Best would be to use AND to check for password inside your query.
Also, use num rows instead of comparing a string.
I, personally am not a big fan of strcmp.
Best would be to use AND to check for password inside your query.
Also, use num rows instead of comparing a string.
PHP код:
WP_Hash(hashpass, sizeof(hashpass), inputtext);
mysql_format(MySQL, query, sizeof(query), "SELECT * FROM `users` WHERE `Name` = '%e' AND `Password` = '%e' LIMIT 1", GetName(playerid), hashpass);
if(mysql_num_rows(query) != 0)
{
// password correct
} else {
// wrong password/username
}