forumdisplay.php:
if($forum['password'] && $action == 'pwverify') {
if($pw != $forum['password']) {
showmessage('forum_passwd_wrong');
} else {
setcookie("fidpw$fid", $pw, 0, $cookiepath, $cookiedomain);
header("Location: {$boardurl}forumdisplay.php?fid=$fid&sid=$sid");
}
}
if (!empty($forum['password']) && $forum['password'] != $HTTP_COOKIE_VARS['fidpw$fid']) {
include template('forumdisplay_passwd');
discuz_exit();
}
The $pw is got by post,and I test that it has the correct value.
And $forum['password'] exists,too.
They are equal.
But why every time I will enter in the second if{}?😕