<form action='phpVerifyPurchase.php' method='post' target='Area_4'>
<hr align="center">
<table bgcolor="#ccccff" border="1" align="center">
<tr>
<td align="center"><input type="checkbox"
name="chk[]">
</td>
<td align="center"><input type="textbox"
name="qty[]"
size="1" value="1">
</td>
<td align="left"> <input type="hidden"
name="city[]"
value="City1">
<b>City1</b>
</td>
<td align="right"> <input type="hidden"
name="price[]"
value="100.00">
<b>100.00</b>
</td>
</tr>
<tr>
<td align="center"><input type="checkbox"
name="chk[]">
</td>
<td align="center"><input type="textbox"
name="qty[]"
size="1" value="1">
</td>
<td align="left"> <input type="hidden"
name="city[]"
value="City2">
<b>City2</b>
</td>
<td align="right"> <input type="hidden"
name="price[]"
value="200.00">
<b>200.00</b>
</td>
</tr>
<tr><td colspan=4>
</td></tr>
<tr><td colspan=4 align='center'>
<input type='submit' value='SUBMIT'>
</td></tr>
</form>
</table>
that's the form
haven't publish
$count=sizeof($qtyarray);
for($i=0; $i<$count; $i++)
{
if ($chkarray[$i] == "on")
{
echo $i;
echo "$qtyarray[$i] <br>";
}
}
$i will return the number of checked-checkbox instead of which checkbox has been checked
this code seems to count the number of the checkbox instead of checking which checkbox is clicked