I am trying to figure out how to validate a section of a form using php. If at least one of value 1-5 is checked, then at least one of value A-E must be checked. Value's A-E cannot be allowed without at least one of 1-5 being checked. Multiple values in each section can be selected, as long as there is at least one value in each section checked.
I have tried individual IF statements and arrays without success.
Does anyone have any suggestions or examples? I am missing something and I am certain it is pretty obvious, right in my face.
<div class="grid_12 alpha">
<strong>DISMISSAL</strong> - This section is to be used for errors which require dismissal by a Judge.
</div>
<div class="grid_5 alpha">
<input class="checkbox" type="checkbox" name="dis_checkbox_a" />A
<input class="checkbox" type="checkbox" name="dis_checkbox_b" />B
<input class="checkbox" type="checkbox" name="dis_checkbox_c" />C
<input class="checkbox" type="checkbox" name="dis_checkbox_d" />D
<input class="checkbox" type="checkbox" name="dis_checkbox_e" />E
</div>
<div class="grid_3">
<input class="checkbox" type="checkbox" name="dis_checkbox_mon" />Missing Officers Name
</div>
<div class="grid_4 omega">
<input class="checkbox" type="checkbox" name="dis_checkbox_civ_crim_error" />Criminal/Civil Designation in Error
</div>
<div class="grid_12 alpha">
<input class="checkbox" type="checkbox" name="dis_checkbox_improp_code_descr" />Improper Statute Number AND Description
</div>
<div class="grid_12 alpha">
<input class="checkbox" type="checkbox" name="dis_checkbox_other" />Other
<input id="input" type="text" name="dis_cit_other" size="115" maxlength="110" onkeypress="checkCapsLock( event )" />
</div>
<div class="grid_6 alpha">
Citing Officer:
<input id="input" type="text" name="dis_cit_officer" size="5" maxlength="5" onkeypress="checkCapsLock( event )" />
(Enter PR# only)
</div>
<div class="grid_6 omega">
Supervisor Notified:
<input id="input" type="text" name="dis_supvsr_notified" size="5" maxlength="5" onkeypress="checkCapsLock( event )" />
(Enter PR# only)
</div>