I'm looking for the way to update a checkbox to the mysql database with PHPP.
I have the following code to read and set the checkbox checked and get the value:
$check_value = ($yesorno == "1") ? 1 : 0;
if ($check_value == "1") {
$check_status = "checked";
echo $check_status;
}
else {
$check_status = "";
echo $check_status;
}
echo $check_value;
So, if the value is "1" I have the checkbox checked. But how can I update this, if the I uncheck the box or set the box from unchecked to checked?
Aucun commentaire:
Enregistrer un commentaire