PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
In PHP, how do I detect the status (on/off) of a checkbox in PHP through its $_POST variable - how does the POST variable change/differ depending on a ON or OFF state?
It gets given the value you assign it in the form, eg value="1", or value="yes" etc.. it's gets assigned 1 for a 'checked' value by default if no value is given.
An unchecked checkbox just won't be posted so it won't even appear in the $_POST array.