php - How do I update the value from a checkbox into MySQL -
my form form method="post">
input type="checkbox" name="facebook" value="yes">
submit
so, want is:
a) if checkbox checked, want update appropriate field yes
b) if checkbox unchecked, want update field no
$_post['chk_ans']
return when being checked,
if (isset($_post['chk_ans'])) { ..update query here .. }