开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜