Getting Checkbox values when user edits form data. PHP -
There is a form with my check box that fills the user and submits. Then I have another form, which allows them to edit the information submitted. This second form pre-populates with information presented on the first form. It's okay with text fields, but how do I populate the checkbox? To wit. If they check the checkbox on the first form, how can I get another check to identify it and display the check box?
I am new to PHP so I can not be more technical for this question << p>
When you submit the form, you have data on the next page, so if a checkbox looks like this:
& Lt; Input type = "checkbox" name = "more 18" value = "1" /> You have to see that the person has chosen "more than 18" -series. ($ _POST ['over18'] == '1') {$ checked = 'checked' "checked";} and {$ check = '
Then your output looks like this for the checkbox:
echo Each time the checkbox is checked, the next page checkbox Also checks.
Comments
Post a Comment