Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Saving bankpassword in MySQL

$
0
0
I tried to make a bank system all by myself. For now I only made the Register dialog, but whenever I try to register it won't save the password in the database
Code:
PHP Code:

        case BankRegisterDialog:
        {
            if(
Player[playerid][BankLogged] == 1)
            {
                if(
strlen(inputtext) < 5)
                {
                      
SendClientMessage(playeridCOLOR_RED"[ERROR] You password must be longer than 5 characters!");
                    return 
ShowPlayerDialog(playeridBankRegisterDialogDIALOG_STYLE_PASSWORD"Bank Password""Enter your desired password below:""Register""Cancel");
                }
                new 
query[100], name[24], query2[100];
                
GetPlayerName(playeridname24);
                
WP_Hash(Player[playerid][BankPassword], 129inputtext);
                
format(querysizeof(query), "UPDATE 'accounts' SET 'Bankpassword' = '%s' WHERE 'Name' = '%s'"Player[playerid][BankPassword], name);
                
mysql_query(mysqlquery);
            }
        } 


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>