How to make a Roleplay name checker on PHP?
#1

Hello there, I'm actually a starter on PHP. today I want to make a RP name checker for my UCP registration. I tried like 2 hours and searching randomly on ****** I can't find the shit.. Who can give me a help? and make a function for me?


I made a function but It does not working!!

PHP код:
function IsValidRPName($string)
{
    if( 
stristr$string '_' ) )
        
$_explodedName explode"_" $string );
    else return 
false;
    for (
$i 0$i $firstName$i++)
    {
        if( !
ctype_upper $_explodedName][ ] ) )
            return 
false;
        else if( !
$i )
            continue;
        else if( 
ctype_upper$_explodedName][ $i ] ) )
            return 
false;
    }
    for (
$i 0$i $lastName$i++)
    {
        if(!
ctype_upper($_explodedName][ ] ) )
            return 
false;
        else if( !
$i )
            continue;
        else if( 
ctype_upper$_explodedName][ $i ] ) )
            return 
false;
    }
    if( 
count$_explodedName ) < || strlen$Name] ) < || strlen($_explodedName]) < || strlen$string ) >= 25 )
        return 
false;
    else
        return 
true;

Reply


Messages In This Thread
How to make a Roleplay name checker on PHP? - by SetPlayerNameTag - 09.01.2016, 16:09
Re: How to make a Roleplay name checker on PHP? - by SetPlayerNameTag - 09.01.2016, 16:15
Re: How to make a Roleplay name checker on PHP? - by NoDi522 - 09.01.2016, 16:29
Re: How to make a Roleplay name checker on PHP? - by Vince - 09.01.2016, 16:30

Forum Jump:


Users browsing this thread: 1 Guest(s)