0

Hi guys...I need some help in matching data from results of checkboxs and radio buttons.

My Intentions:

There are 3 radio buttons and 8 check boxes. Users can select any one but cannot don't select at all. I separate the calss and categories because for classes, users can only select 1 option whereas for categories users can select many.
For example, User select class 1 but do not select anything else and click submit...the system will then retrieve that he selected and check the data base if he have the pre requisites to allow him to go through.

Coding for my form:

<form id="applicationoptions" method="post" action="s_apply_now.php">
<div id="optionshead">Class :</div>
<div id="classoptions">
<input type="radio" name="class" value="1" /> Class 1 Permit       
<input type="radio" name="class" value="2" /> Class 2 Permit       
<input type="radio" name="class" value="3" /> Class 3 Permit
</div>
<div id="optionshead2">Categories :</div>
<div id="catoptions">
<input type="checkbox" name="cat" value="1" /> CAT 2PG         
<input type="checkbox" name="cat" value="2" /> CAT 1OR         
<input type="checkbox" name="cat" value="3" /> CAT 2TT <br/><br/>
<input type="checkbox" name="cat" value="4" /> CAT 3PG         
<input type="checkbox" name="cat" value="5" /> CAT 2OR         
<input type="checkbox" name="cat" value="6" /> CAT 3TT <br/><br/>
<input type="checkbox" name="cat" value="7" /> CAT 4PG         
<input type="checkbox" name="cat" value="8" /> CAT 3OR
</div>
<div class="applynext">
<input class="applynextbutton" type="submit" name="applynextbutton" value="PROCEED" />
</div>
</form>

Lets say if user do not select any class, but select CAT 3PG, system will check if user have the pre-requisites before proceeding to next step.

Any one can help me or give me hints?? most importantly is i do not know how to retreieve the values selected from the form.

Thanks in advance guys...greatly appreciate.

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Szabi Zsoldos
0

The name should be an array, cat[] and class[] and the verification should go via Javascript or you can pass your values via PHP but that is kind of old school.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.