<td><input type="checkbox" value="" id='jq_001'><span class="jq" id="4_s">1.90</span></td> <td><input type="checkbox" value="" id='jq_002'><span class="jq" id="4_s">1.70</span></td> <td><input type="checkbox" value="" id='jq_003'><span class="jq" id="4_s">3.20</span></td> <td><input type="checkbox" value="" id='jq_004'><span class="jq" id="4_s">2.60</span></td>
Now I want to detect user's selections.
1, do I have to put all the checkboxes in a form like
<form method="post" action="check-selection.php">? and add a submit button like
<input type="submit" name="formSubmit" value="Submit" />?
2, how do I determine which is checked in the php?
if(isset($_POST['formSubmit'])
{
if($_POST['jq_001']) echo '1.90';
if($_POST['jq_002']) echo '1.70';
if($_POST['jq_003']) echo '3.20';
if($_POST['jq_004']) echo '2.60';
}
This post has been edited by Dormilich: 08 August 2012 - 10:31 PM

New Topic/Question
Reply



MultiQuote





|