Ver Mensaje Individual
  #13 (permalink)  
Antiguo 17/08/2005, 15:43
Avatar de claudiovega
claudiovega
 
Fecha de Ingreso: octubre-2003
Ubicación: Puerto Montt
Mensajes: 3.667
Antigüedad: 20 años, 6 meses
Puntos: 11
Crea un arreglo de cantidades
Código PHP:
<?php
$tabla
=mysql_db_query("bd","select * from tabla);
echo "
<table border="1\" width=\"600\">";
echo 
"<tr><td colspan=\"3\" width=\"600\">Cabecera</td></tr>";
while(
$row=mysql_fetch_array($tabla)){
ehco "<tr>";
echo 
"<td width=\"200\">".$row["nombre"]."</td>";
echo 
"<td width=\"200\">".$row["descripcion"]."</td>";
//aqui el problema
echo "<td width=\"200\">";
echo 
"<form method=\"post\" action=\"pagina\">";
echo 
"<input type=\"text\" name=\"cantidad[]\">";
echo 
"<input type=\"submit\" value=\"enviar\" name=\"enviar\">";
echo 
"</td></tr>";
}
echo 
"</table>";
?>
Luego en el script que recibe usas esto, para mostrar todas

Código PHP:
<?php
    
foreach($_POST['cantidad'] as $cant)
        echo 
$cant."<br>":
?>