i have this function, it is supposed work, to validate if two passwords match
What is problem with this code?
function validatePasswords($myPassword, $pass2) {
//if DOESN'T MATCH
if(strpos($myPassword, ' ') !== false)
return false;
//if are valid
return $myPassword == $pass2 && strlen($myPassword) >= 4;
}
thanks :)