18.03.2012, 16:53
I got a problem with md5, I encrypted a password in a dialog and at phpmyadmin the password is encrypted , but i can't login, I try ed to encript the password when the player logs and query it but doesn't work, hope someone uses this include and can give me some help thanks.
The code:
Here is the include attachment.
The code:
pawn Код:
new query[100]; // Register Part
MD5_Hash(inputtext);
format(query, sizeof(query),"INSERT INTO playerdb (id,username,password,score) VALUES (NULL,'%s',md5('%s'),%d)",playerdb[playerid][username],inputtext,1);
mysql_query(query);
new query[150]; // login part
MD5_Hash(inputtext);
format(query, sizeof(query),"SELECT * FROM playerdb WHERE username = '%s' AND password = md5('%s')",playerdb[playerid][username],inputtext);
mysql_query(query);