Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/03/2009, 15:22
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: capturar valores de checkbox

Porque no los envias como un array y así los rescatas?:
Código html:
Ver original
  1. <input type="checkbox" name="preguntas[0]" value="1" />
  2. <input type="checkbox" name="preguntas[1]" value="1" />
  3. <input type="checkbox" name="preguntas[2]" value="1" />

Código php:
Ver original
  1. foreach($_POST['preguntas'] as $indice => $valor ) {
  2.       echo "Checkbox $indice, Valor: $valor";
  3. }

Saludos.