save email sqlite
#1

I have problems to save the E-mail

I did so, but only saves a 0

PHP код:
if(dialogid == DIALOG_EMAIL)
    {
           new 
string[128];
           if(!
response) return Kick(playerid);
           if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_EMAILDIALOG_STYLE_INPUT,"Email","Enter your E-Mail","Next","Quit");
           
format(stringsizeof(string), "UPDATE `User` SET `EMAIL`='%i' WHERE `Name`='%s'"inputtextNamePlayer(playerid));
           
db_free_result(db_query(Datastring));
           
ShowPlayerDialog(playeridDIALOG_SEXODIALOG_STYLE_LIST,"Sex","Man\nWoman","Next","Quit");
    } 
Reply
#2

An email is a string. You will need to use '%s'. You should also consider escaping the email address (DB_Escape).
Reply
#3

Unescaped user input! Beware! A malicious user could easily corrupt your entire user table.
Reply
#4

what?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)