小编Tra*_*ery的帖子

php中的字符串比较

我试图比较HTML中的密码表单中的两个字符串.

它们存储在变量中$_POST.我打印出来看起来一样,但下面的代码永远不会评估为真,只有假.为什么会这样?

//Verify the passwords match
if( ($passwd != $pass_confirm) && ($new_email != $email_confirm) ){
    echo "Email and/or password do not match";
    return FALSE;
}
Run Code Online (Sandbox Code Playgroud)

我感谢任何帮助.

html php string

0
推荐指数
1
解决办法
227
查看次数

标签 统计

html ×1

php ×1

string ×1