MySQL e-mail registration problem ?
#1

Solved
Reply
#2

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

Reply
#3

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 "")
Reply
#4

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
Reply
#5

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.
Reply
#6

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
Reply
#7

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.
Reply
#8

Why would you create both an unnecessary loop and variable? Might aswell do this;
Код:
if(strfind(inputtext, "@", true) != -1) {
    // Yes @
} else {
    // No @
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)