Ver Mensaje Individual
  #7 (permalink)  
Antiguo 27/09/2010, 12:37
yuo2
 
Fecha de Ingreso: diciembre-2008
Ubicación: PERU
Mensajes: 294
Antigüedad: 15 años, 4 meses
Puntos: 23
Respuesta: duda con arrays

hola bueno aplique sesiones a ver si cada dato ingresado en el textbox lo acumulaba en la matriz pero no pude lograrlo, a ver quisiera que me corrigan; aqui les pongo mi codigo.

Código PHP:
Ver original
  1. <?
  2. ?>
  3. <html>
  4. <head><title>2010</title></head>
  5. <body>
  6. <form name="form1" method="post" action="prueba.php">
  7.   <table width="158" border="0" cellspacing="0" cellpadding="0">
  8.     <tr>
  9.       <td width="188"><input type="text" name="txtuno"></td>
  10.     </tr>
  11.     <tr>
  12.       <td><input type="submit" id="btn" name="btn" value="Enviar"></td>
  13.     </tr>
  14.   </table>
  15. </form>
  16. <?
  17. $_SESSION["mi_var"]=$txtuno;
  18. $matriz = array($_SESSION["mi_var"]);
  19.  
  20. foreach ($matriz as $valor)
  21. echo "$valor";
  22. ?>
  23. </body>
  24. </html>