Can somebody help me via counting variables after a user clicks a submit button? Basically I have two checkboxes that the user can check. After checking a box or boxes, they hit submit and the rubrics chosen displays the number of rubrics chosen. Under each of these rubrics are a list of remedies under these rubrics. What I need help with is counting the remedies. Say they choose Mind-Anger, the remedy Aconite comes up and would count as 1. Say they choose two rubrics: Mind-Anger and Mind-Anger(Irascibility), then aconite should come up with a 2 count. Right now I’m having trouble with this. Please help me. Thanks. My code is below:
[php]
<?php $Aconite[0] = 1; $Aconite[1] = 1; ?>Choose Rubrics to Help Find the Remedy:
Mind - Anger(Irascibility)
Mind - Anger
'; if ($how_many>0) { echo 'You chose the following rubrics:
'; } for ($i=0; $i<$how_many; $i++) { echo ($i+1) . '- ' . $rubric[$i] . '
'; } echo "
"; } $result = count($Aconite); echo ($result); ?> [/php]