I am reviewing some old code that checks for Password Strength.
(My goal was to do the checks WITHOUT using Regular Expressions.)
The code below is supposed to check for at least one Uppercase Letter, but I don't think it works like the person who suggested it thought...
PHP Code:
// Check for Uppercase Letter.
if (empty($errors)){
if (strtolower($newPass1) == $newPass1){
$errors['newPass'] = 'Password must have at least 1 Uppercase Letter.';
}
}
The last row is where it seems to fail...
Code:
$newPass1 strtolower($newPass1) IF()
---------- ---------------------- ------
debbie debbie TRUE
Debbie debbie FALSE
DEBBIE debbie FALSE
Any suggestions?
Debbie