MySQL e-mail registration problem ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL e-mail registration problem ? (
/showthread.php?tid=611122)
E-mail registration problem ? -
sampkinq - 02.07.2016
Solved
Re: MySQL e-mail registration problem ? -
SyS - 02.07.2016
of course you can example code
PHP код:
new bool:flag=false;
for(new i=0;i<sizeof inputtext;i++)
{
if(inputtext[i]=='@')
{
flag=true;
break;
}
}
if(!flag)
{
//if the inputted string does not have @ do the correspondense
}
Re: MySQL e-mail registration problem ? -
sampkinq - 02.07.2016
Quote:
Originally Posted by Sreyas
of course you can example code
PHP код:
new bool:flag=false;
for(new i=0;i<sizeof inputtext;i++)
{
if(inputtext[i]=='@')
{
flag=true;
break;
}
}
if(!flag)
{
//if the inputted string does not have @ do the correspondense
}
|
Код:
warning 224: indeterminate array size in "sizeof" expression (symbol "")
Re: MySQL e-mail registration problem ? -
SyS - 02.07.2016
Quote:
Originally Posted by sampkinq
Код:
warning 224: indeterminate array size in "sizeof" expression (symbol "")
|
try it
PHP код:
new bool:flag=false;
for(new i=0;i<=strlen(inputtext);i++)
{
if(inputtext[i]=='@')
{
flag=true;
break;
}
}
if(!flag)
{
//if the inputted string does not have @ do the correspondense
}
NOTE:above code is just example..and it will only detect @ you can think logically and make it work for '.' and other things you want
Re: MySQL e-mail registration problem ? -
sampkinq - 02.07.2016
Quote:
Originally Posted by Sreyas
try it
PHP код:
new bool:flag=false;
for(new i=0;i<=strlen(inputtext);i++)
{
if(inputtext[i]=='@')
{
flag=true;
break;
}
}
if(!flag)
{
//if the inputted string does not have @ do the correspondense
}
NOTE:above code is just example..
|
Thank you for your help.
Re: MySQL e-mail registration problem ? -
SyS - 02.07.2016
Quote:
Originally Posted by sampkinq
Thank you for your help.
|
post the main topic back dont remove it so that someone in future can refer here
Re: MySQL e-mail registration problem ? -
Vince - 02.07.2016
We should start keeping a list of people who do that, as a reminder to everyone to never reply to their topics again. Deleting your thread after you've got your solution is both egocentric and ungrateful.
Re: MySQL e-mail registration problem ? -
d1git - 02.07.2016
Why would you create both an unnecessary loop and variable? Might aswell do this;
Код:
if(strfind(inputtext, "@", true) != -1) {
// Yes @
} else {
// No @
}