Ver Mensaje Individual
  #8 (permalink)  
Antiguo 21/03/2014, 19:30
__SDP__
 
Fecha de Ingreso: agosto-2010
Ubicación: santiago, CHILE
Mensajes: 564
Antigüedad: 13 años, 9 meses
Puntos: 9
Respuesta: Agregar a mysql datos de varios checkbox por medio de php

eso mismo decia yo, revisa esto

Código PHP:
Ver original
  1. <?php
  2.     print_r($_POST)
  3. ?>
  4. <html>
  5. <head>
  6.     <title>...</title>
  7.  
  8. </head>
  9. <body>
  10.  
  11. <form action="" method="post">
  12.     <input type="checkbox" name="chkname[]" value="1">1111</input>
  13.     <input type="checkbox" name="chkname[]" value="2">2222</input>
  14.     <input type="checkbox" name="chkname[]" value="3">3333</input>
  15.     <input type="checkbox" name="chkname[]" value="4">4444</input>
  16.     <input type="checkbox" name="chkname[]" value="5">5555</input>
  17.     <br>
  18.     <input type="submit" value="enviar">
  19. </form>
  20.  
  21. </body>
  22. </html>


devuelve esto

si presiono como ejemplo el check 1111 y el 3333,
me devuelve los indices de los check que estan activados


Array ( [chkname] => Array ( [0] => 1 [1] => 3 ) )


bye.