Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. $chkcount = 0;
  2. if (isset($_POST['check1'])) && ($_POST['check1']){ ++$chkcount;}
  3. if (isset($_POST['check2'])) && ($_POST['check2']){ ++$chkcount;}
  4. ....
  5. if (isset($_POST['check9'])) && ($_POST['check9']){ ++$chkcount;}
  6. if ($chkcount > 1){
  7. // multiple checkboxes checked
  8. } else {
  9. // one or zero checked
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement