Q:

Two groups of checkboxes, if first one is checked second can not be

I have two "groups" of checkboxes (although the first group only contains one checkbox), but if user checks the checkbox from the first group I want to restrict the ability of checking the checkboxes from second group...
<div>
  <h3>First group</h3>
  <label>
    <input type="checkbox" value="1" name="group1" />If checked, checks all the checkboxes in 2nd group</label>
  <label>
</div>
<div>
  <h3>Second Group</h3>
  <label>
    <input type="checkbox" class="radio" value="1" name="group2" />1</label>
  <label>
    <input type="checkbox" class="radio" value="1" name="group2" />1</label>
</div>

A:

I've used a simple jQuery script to solve it.
initially it didn't exactly do what I wanted it to do, but I've managed to work around it with php as I had to make sure that if someone checked the checkbox from the second group that it didn't go to the database.
$('#checkbox1').click(function() {
             if( $(this).is(':checked')) {
                 $("#checkbox2").hide();
             } else {
                 $("#checksbox2").show();
             }
         });

As for php I simply used a ternary operator to make sure that if checkbox with id checkbox1 is checked then I want to ignore the rest of the checkboxes...
$smnrs = !empty($_POST['all']) ? explode(';', $_POST['all']) : $_POST['seminars'];

in this case $_POST['all'] refers to the first checkbox that if clicked it hides the div holding the other checkboxes.

