Page 1 of 1

Quick n00b ? how do you count characters?

Posted: Sat Jul 17, 2004 9:28 pm
by AlbinoJellyfish
I need to count characters for a password. How do i do that? I want it so it needs to be at least 6 characters long.

Posted: Sat Jul 17, 2004 9:34 pm
by PrObLeM
maybe this will help
http://us3.php.net/count_chars

Posted: Sat Jul 17, 2004 11:45 pm
by d3ad1ysp0rk

Code: Select all

if(strlen($input) < 6){
echo "Error. Input must be 6 or more.";
}
else {
echo "Thanks for inputting a string with 6 or more characters! ";
}
[php_man]strlen[/php_man]() / [php_man]count[/php_man]()