within a php-form I have these checkboxes (I display only 2 but there are 10) :
<tr><td>
<input class="inputc2" size="25" name="naam1" value="<?php echo "$_POST[naam1]"; ?>">
<INPUT TYPE="checkbox" NAME="act1[]" id="act1" VALUE="4x4">4x4
<INPUT TYPE="checkbox" NAME="act1[]" id="act1" VALUE="carcontrol">CarControl
<INPUT TYPE="checkbox" NAME="act1[]" id="act1" VALUE="karting">Karting
</td>
</tr>
<tr>
<td align="right" class="inputc1">Naam persoon 2 : </td>
<td class="inputc1">
<input class="inputc2" size="25" name="naam2" value="<?php echo "$_POST[naam2]"; ?>">
<INPUT TYPE="checkbox" NAME="act2[]" VALUE="4x4">4x4
<INPUT TYPE="checkbox" NAME="act2[]" VALUE="carcontrol">CarControl
<INPUT TYPE="checkbox" NAME="act2[]" VALUE="karting">Karting
</td>
</tr>
For each subscriber you can fill in his name and select the activity he wants to participate.
I want to know how you can limit these checkboxes to max 2 checks and display imediatly a errormessage when the third checkbox is checked.
Does anyone knows how to do this?