php validation doesn't work
i have this function, it is supposed work, to validate if two passwords m开发者_开发知识库atch
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 :)
There is no problem with the code you posted.
精彩评论