因此,当用户创建一个帐户时,他们必须勾选复选框才能继续,但我如何存储他们接受了它(即使他们无法在不接受它的情况下创建帐户)。但是我们仍然想存储它。
复选框
<input type="checkbox" name="agree" value="accepted">
PHP
if ($_POST['agree'] != 'accepted') {
$error[] = 'Please indicate that you have read and agree to the Terms and Conditions and Privacy Policy';
} else {
$stmt = $db->prepare('SELECT termsAccepted FROM members WHERE termsAccepted = :??????');
$stmt->execute(array(':??????' => $?????));
$row = $stmt->fetch(PDO::FETCH_ASSOC);
}
HUX布斯
牛魔王的故事