-1

我无法执行此查询:

$sl="update customers set activation_code='$reg' WHERE  c_number='$users1' and password='$id'";
$result=mysql_query($sl);
if (mysql_error()) {
    ?>
    <script type=text/javascript>
       window.alert("Error, You have not used our services before, so no details for you to visit and explore");
    </script>
    <?php
} else {
    echo $reg;
}

每次我输入详细信息时,我都会显示激活密钥……意味着它根本没有选择我的 if 子句……请帮我解决这个问题,帮我解决这个问题

4

1 回答 1

2

您应该两次使用 WHERE 子句

$sl="update customers set activation_code='$reg' WHERE  c_number='$users1' and password='$id'"
于 2013-07-02T08:20:44.127 回答