I have 4 check boxes
Since number of check
boxes are dynamic
Which is it? Four? Or
some arbitrary quantity?
Do you really want
people to check multiple boxes?
I'd question that as well.
This seems a sign-up for membership. It's normal to choose
exactly one level of membership. It would be a very odd
arrangement to be able to choose more than one!
As Jake suggests, a set of
radio buttons would be more appropriate.
Start by choosing
the appropriate type of input. Can you clarify your intent?
Since number of check
boxes are dynamic I cannot use and/or conditions
You could use and/or
conditions if you loop over your n check-boxes. But Jake
has provided a neater solution, if you really need to know how
many checkboxes are checked.
But
doubt that check-boxes really make sense here. Maybe you
prefer the look of the check-boxes, and if that's the
case, it could be done, but bear it mind it will likely
confuse your users, because they will be used to seeing radio
buttons for mutually-exclusive selections.