Argh! No matter what I do I cannot get the value of the checkbox to stick. I'm trying to create a data entry and update form(s) that allow the user to select a checkbox specifying if the record is ready for enrollment. When I go to modify the values I cannot get the checkbox to 'stick' if it was already checked and updated as checked. The next time I open the record it is still unchecked.
I've also tried changing it and had it work the other way around so that it is checked no matter what.
How do I get it so the checkbox is checked if it was saved as checked and unchecked if saved as unchecked?
Here's the code I'm using in the actual form itself:
<? if ('$ready_for_enrollment' == 1) {
echo "<input type=\"checkbox\" name=\"ready_for_enrollment\" id=\"ready_for_enrollment\" value=\"1\" checked>";
} else {
echo "<input type=\"checkbox\" name=\"ready_for_enrollment\" id=\"ready_for_enrollment\" value=\"0\">";
}?>
Why isn't this working?
Thanks,
S./