拜托,任何人都可以帮助我理解为什么不工作? 我回显变量来检查值,我有相应的0和1,相同的IF条件...... 查询工作,如果不工作......
$data = ($_POST);
$cn = $data['cn'];
$email = $data['email'];
$con1 = mysql_query("SELECT * FROM `crm` WHERE cn = '$cn'", $con);
$num_cn = mysql_num_rows($con1);
$con2 = mysql_query("SELECT * FROM `crm_contacts` WHERE email = '$email'", $con);
$num_email = mysql_num_rows($con2);
echo $num_cn;
echo "<br>";
echo $num_email;
if ($num_cn == "0" && $num_email == "1") {
echo "<script type='text/javascript'>";
echo "location.href='crm.php?Error=2;";
echo "</script>";
exit;
}
答案 0 :(得分:0)
在:
echo "location.href='crm.php?Error=2;";
您错过了结束'
:
echo "location.href='crm.php?Error=2';";
// ^