• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[PHP] <32 and >=6

PuzzeL

www.XERIA.pl Come! :D
Joined
Feb 7, 2010
Messages
62
Reaction score
3
Location
//Poland
Hello please help me!
I must have this line:
if(strlen($account) < 32)
so that it is in addition to 32, greater than 6
 
Code:
if(strlen($account) < 6 || strlen($account) > 32)
{
       echo "Account must have a minium of 6 characters and a maxium of 32 characters.";
}

Not sure if you ment this tho.
 
Last edited by a moderator:
excerpt from the script ajax_check_account.php responsible for this function
Code:
if(strlen($account) < 32)
{
    if(!check_account_name($account))
    {
        echo '<font color="red">Zly format nazwy konta. Używaj tylko A-Z i cyfry 0-9.</font>';
        exit;
    }
    $account_db = new Account();
    $account_db->find($account);
    if($account_db->isLoaded())
        echo '<font color="red">Account with this name already exist.</font>';
    else
        echo '<font color="green">Good ( '.htmlspecialchars($account).' ). You can create account.</font>';
}
else
    echo '<font color="red">Account must have a minium of 6 characters and a maxium of 32 characters.</font>';
exit;
You understand me?
Minimum 6, maximum 32
This function locks only 32 characters
 
PHP:
if(strlen($account) >= 6 and strlen($account) <= 32)
PHP:
if(in_array(strlen($account), range(6, 32))
 
Back
Top