How to get the values ​​of the check box in PHP


Possible Duplicate:
Retrieving values from a checkbox

In the following script I am able to return only the last selected value of the checkbox. How do I return the rest of the values for validation purpose.


Qualification: <input type="checkbox" name="qual" value="10" /> 10th Std
<input type="checkbox" name="qual" value="12" /> 12th Std
<input type="checkbox" name="qual" value="grad" /> Graduation

PHP Code

 $qual = array();
 $qual = $_GET['qual'];

 print_r ($qual);

Try this one .This may help you ....

<input type="checkbox" name="qual[]" value="10" /> 10th Std
<input type="checkbox" name="qual[]" value="12" /> 12th Std
<input type="checkbox" name="qual[]" value="grad" /> Graduation

PHP Coding:

$qualfication = $_GET['qual'];