como saber que check box esta activado y cual esta desactivado segun ese orden
por ejemplo:
1 John 1 Mike 0 Rone
0 Mathew 0 Reid 1 Simon
al presionar el boton, segun lo seleccionado
Código PHP:
$box=$_POST['box'];
while (list ($key,$val) = @each ($box)) {
echo "$val,";
}
echo "<form method=post action=''>";
echo "<table border='0' cellspacing='0' style='border-collapse: collapse' width='100' >
<tr bgcolor='#ffffff'>
<td width='25%'><input type=checkbox name=box[] value='John'></td>
<td width='25%'> John</td>
<td width='25%'><input type=checkbox name=box[] value='Mike'></td>
<td width='25%'> Mike</td>
<td width='25%'><input type=checkbox name=box[] value='Rone'></td>
<td width='25%'> Rone</td>
</tr>
<tr bgcolor='#f1f1f1'>
<td width='25%'><input type=checkbox name=box[] value='Mathew'></td>
<td width='25%'> Mathew</td>
<td width='25%'><input type=checkbox name=box[] value='Reid'></td>
<td width='25%'> Reid</td>
<td width='25%'><input type=checkbox name=box[] value='Simon'></td>
<td width='25%'> Simon</td>
</tr>
<tr><td colspan =6 align=center><input type=submit value=Select></form></td></tr>
</table>";