Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/08/2009, 09:17
Avatar de gjx2
gjx2
 
Fecha de Ingreso: agosto-2008
Ubicación: R.D
Mensajes: 1.153
Antigüedad: 15 años, 8 meses
Puntos: 139
Respuesta: problema con $_post

A un que modificando tu forma tambien funciona

Código PHP:
Ver original
  1. <form name="ss" action="<?=$_SERVER['PHP_SELF']?>" method="post">
  2. <?php
  3. for($a=0;$a<4;$a++):?>
  4. <input type="text" name="text<?=$a?>">
  5. <?php endfor; ?>
  6. <input type="hidden" name="num" value="<?=$a?>">
  7. <input type="submit" value="wwww" name="btn">
  8. </form>



Código PHP:
Ver original
  1. if(isset($_POST['btn'])){
  2.  
  3. for($i=0;$i<$_POST['num'];$i++){
  4. echo $_POST['text'.$i]."<BR>";
  5. }  
  6.  
  7.  
  8. }