Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/11/2009, 06:05
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: $_REQUEST dinamico?

Lo que tienes que enviar es una matriz de dorsal y una matrix de goles
de esta manera .


Código PHP:
Ver original
  1. <?php
  2. $result=mysql_query("select * from jugadores order by pos ASC",$link);
  3. while($row = mysql_fetch_array($result)) {
  4.  
  5. ?>
  6. <table align="center" style="font-size:12px">
  7.     <tr style="font-size:16px">
  8.         <td><b><? echo $row["nombre"]; ?></b></td>
  9.     </tr>
  10.     <tr>
  11.         <td>Dorsal</td>
  12.         <td><input type="text" name="dorsal[]" size="2" value="" /></td>
  13. </td>
  14.         <td>Goles</td>
  15.         <td><input type="text" name="goles[]" size="2" value="" /></td>
  16.     </tr>
  17. </table>
  18. <?
  19. }
  20. ?>

Y luego lo recibes de esta forma

Código PHP:
Ver original
  1. <?php
  2. foreach($_POST['dorsal'] as $rows){
  3.  
  4. echo $rows."<br>";
  5.  
  6. }
  7.  
  8. foreach($_POST['goles'] as $rows){
  9.  
  10. echo $rows."<br>";
  11.  
  12. }
  13.  
  14. ?>