An easy question:
How do I check in PHP whether a checkbox is checked or not?
|
If the checkbox is checked you the value of it will be passed. Otherwise it won't.
|
|||
|
http://www.html-form-guide.com/php-form/php-form-checkbox.html This covers checkboxes, and checkbox groups. |
|||
|
Try this
Or this
|
||||
|
you can check that by either for example
here you can check by
or
the above will check only one if you want to do for many than you can make an array instead writing separate for all checkbox try like
php
|
|||
|
I did a blog post on determining if a checkbox is checked or not, in the case you want the value from either case to be in your $_POST array. Check out http://www.martinbean.co.uk/web-development/the-check-box-input-element/ for a more in-depth explanation. |
|||
|