Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/08/2009, 09:15
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: Usar checkbox

Para poder poner un nombre a todos los checkbox sin saber la cantidad te sugiero usar array. Me refiero
Código php:
Ver original
  1. <input type="checkbox" name="chk[]" />
  2. <input type="checkbox" name="chk[]" />
  3. <input type="checkbox" name="chk[]" />
  4. <input type="checkbox" name="chk[]" />
  5. <input type="checkbox" name="chk[]" />
  6. <input type="checkbox" name="chk[]" />
  7. <input type="checkbox" name="chk[]" />
  8. <input type="checkbox" name="chk[]" />
  9. <input type="checkbox" name="chk[]" />
  10. <input type="checkbox" name="chk[]" />

Cuando los llames en la otra pagina solo tienes que llamarlos por el array me refiero. Vamos a suponer que pasas los datos por el metodo de post y con la variable $_POST las recoges
Código php:
Ver original
  1. $_POST["chk"][0]
  2. $_POST["chk"][1]
  3. $_POST["chk"][2]
  4. $_POST["chk"][3]
  5. $_POST["chk"][4]
  6. $_POST["chk"][5]
  7. $_POST["chk"][6]
  8. $_POST["chk"][7]
  9. $_POST["chk"][8]
  10. $_POST["chk"][9]

Claro en vez de declarar el numero tu lo haces en un loop, sea WHILE, FOR o FOREACH
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos