27.07.2012, 10:43
(
Последний раз редактировалось SEnergy; 27.07.2012 в 11:21.
)
my connection host is the same I'm using for my website, which is working fine, I guess I'll have to install mysql on pc ;/
edit: it's working, thanks!
edit2: well, I can enter ANY password to login, any suggestions?
edit: it's working, thanks!
edit2: well, I can enter ANY password to login, any suggestions?
PHP код:
if(dialogid == iLoginDialog)
{
if(response)
{
if(strlen(inputtext) > 0)
{
new EscapedText[60];
mysql_real_escape_string(inputtext, EscapedText);
new len = strlen(EscapedText);
format(Query, sizeof(Query), "SELECT `Password` FROM `RL` WHERE `Username` = '%s';", pName);
mysql_query(Query);
new result[60];
mysql_fetch_field_row(result, "Password");
if(strcmp(EscapedText, result, true, len) == 0)
{
TogglePlayerSpectating(playerid, false);
return 1;
}
}
ShowPlayerDialog(playerid, iLoginDialog, DIALOG_STYLE_PASSWORD, "Login", "Enter Your Password!", "Login", "Cancel");
}
else
return 0;
}