Assuming you have a form that looks something like this:
<form method="post" action="some_handler.php">
<label for="option1">Option 1</label>
<input id="option1" type="checkbox" name="option1" />
<label for="option2">Option 2</label>
<input id="option2" type="checkbox" name="option2" />
<!-- submit, etc -->
</form>
You can check for the presence of the checkbox values (by name) in $_POST
, i.e.
<?php
$optionOne = isset( $_POST['option1'] );
$optionTwo = isset( $_POST['option2'] );
If the boxes aren't checked, $_POST
won't contain values for them.