我正在尝试比较从 HTML 中的密码表单中获得的两个字符串。
它们被存储在变量中$_POST
。我将它们打印出来,它们看起来一样,但是下面的代码永远不会评估为真,只会评估为假。为什么会这样?
//Verify the passwords match
if( ($passwd != $pass_confirm) && ($new_email != $email_confirm) ){
echo "Email and/or password do not match";
return FALSE;
}
我很感激任何帮助。