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 ..  } 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -