Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/11/2009, 08:03
flashtkd
 
Fecha de Ingreso: agosto-2008
Mensajes: 587
Antigüedad: 15 años, 9 meses
Puntos: 6
como saber que check box esta activado



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%'>&nbsp;John</td> 
<td width='25%'><input type=checkbox name=box[] value='Mike'></td> 
<td width='25%'>&nbsp;Mike</td> 
<td width='25%'><input type=checkbox name=box[] value='Rone'></td> 
<td width='25%'>&nbsp;Rone</td> 
</tr> 
<tr bgcolor='#f1f1f1'> 
<td width='25%'><input type=checkbox name=box[] value='Mathew'></td> 
<td width='25%'>&nbsp;Mathew</td> 
<td width='25%'><input type=checkbox name=box[] value='Reid'></td> 
<td width='25%'>&nbsp;Reid</td> 
<td width='25%'><input type=checkbox name=box[] value='Simon'></td> 
<td width='25%'>&nbsp;Simon</td> 
</tr> 

<tr><td colspan =6 align=center><input type=submit value=Select></form></td></tr> 
</table>"