VALUE = VALUE on dialog
#1

Hello!

I`m trying to make a system to validate an e-mail.

I did /setmail, when someone will enter an e-mail adress will receive on it a validation key.

After it, he must insert validation key from e-mail but i do not know how to check if the inputtext value is the same with validation key.

I did it:
Код HTML:
case 589:
			{
			    
				if(response && strlen(inputtext)<10)
				{
				    new da = strlen(inputtext);
				    if(PlayerData[playerid][pMailKey] == da)
				    {
				    	new Str[256],pname2[25];
				    	GetPlayerName(playerid,pname2,25);
						format(string128, sizeof(string128), "You e-mail adress was validated: %s", PlayerData[playerid][pEmail]);
						SCM(playerid, COLOR_GRAD4, string128);
						PlayerData[playerid][pMailValid] = 1;
						format(Str,256,"UPDATE `playeraccounts` SET `MailKey`='0' WHERE `playerID`='%d'",PlayerData[playerid][pInternalID]);
				    	mysql_tquery(handle,Str);
						format(Str,256,"UPDATE `playeraccounts` SET `playerMailValid`='%d' WHERE `playerID`='%d'",PlayerData[playerid][pMailValid],PlayerData[playerid][pInternalID]);
				    	mysql_tquery(handle,Str);
					}
					return 1;
				}
			}
I use
Код HTML:
 new da = strlen(inputtext);
				    if(PlayerData[playerid][pMailKey] == da)
to check if the value is the same but even if I insert the right value it is doesn't work.

P.S.: In the last dialog when the e-mail is sent PlayerData[playerid][pMailKey] gets that value.

How can I do this?
Reply


Messages In This Thread
VALUE = VALUE on dialog - by Nin9r - 24.08.2018, 12:49
Re: VALUE = VALUE on dialog - by DarkSkull - 24.08.2018, 13:44
Re: VALUE = VALUE on dialog - by Shinja - 24.08.2018, 14:08
Re: VALUE = VALUE on dialog - by Nin9r - 24.08.2018, 14:14
Re: VALUE = VALUE on dialog - by Nin9r - 24.08.2018, 14:20

Forum Jump:


Users browsing this thread: 1 Guest(s)