Mysql | Always wrong password
#1

Hello, when i enter the correct password it always says that it's incorrect.. I have no idea where I have gone wrong and been trying different things to fix it but.. no luck
pawn Code:
public Mysql_Login(playerid, password[])
{
    mysql_real_escape_string(PlayerName(playerid), PlayerName(playerid));
    mysql_real_escape_string(password, password);
    new Hash[129], Query[500];
    WP_Hash(Hash, 129, password);
    format(Query, 500, "SELECT * FROM `users` WHERE `username` = '%s' AND `password` = '%s'", PlayerName(playerid), Hash);
    mysql_query(Query);
    mysql_store_result();
    if(mysql_num_rows() == 1)
    {
        SendClientMessage(playerid, COLOR_WHITE, "You have been logged in and your {FF0000}stats are loaded");
        LoggedIn[playerid] = 1;
    }
    else
    {
        SendClientMessage(playerid, -1, "Wrong password");
    }
    mysql_free_result();
    return 1;
}
Reply


Messages In This Thread
Mysql | Always wrong password - by thefatshizms - 23.01.2013, 17:52
Re: Mysql | Always wrong password - by Sweez - 23.01.2013, 17:59
Re: Mysql | Always wrong password - by thefatshizms - 23.01.2013, 19:07
Re: Mysql | Always wrong password - by FUNExtreme - 23.01.2013, 19:16
Re: Mysql | Always wrong password - by thefatshizms - 23.01.2013, 19:21
Re: Mysql | Always wrong password - by FUNExtreme - 23.01.2013, 19:23
Re: Mysql | Always wrong password - by thefatshizms - 23.01.2013, 19:46
Re: Mysql | Always wrong password - by DanLore - 23.01.2013, 19:51
Re: Mysql | Always wrong password - by thefatshizms - 23.01.2013, 20:13

Forum Jump:


Users browsing this thread: 5 Guest(s)