Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/04/2007, 15:04
kensou_udlax
 
Fecha de Ingreso: abril-2007
Ubicación: Concon, Viña del mar
Mensajes: 34
Antigüedad: 17 años
Puntos: 0
Re: necesito ayuda con arreglos y formulario

miren revise el codigo pero aun asi me ha quedado de la siguiente forma:

<html>
<head><title>
</title></head>
<body>
<form action="b2.php" method="post" name='form'>
<table border='1'>
<tr>
<td>nombre</td>
<td>apellido</td>
<td>fono</td>
</tr>
<?php
if (count($_POST['nombre'])>0)
{
$largo=count($_POST['nombre']);
echo "$largo";
for($i=0;$i<count($_POST['nombre']);$i++){
echo "<td>".$_POST['nombre'][$i].'<br /></td>';
echo "<td>".$_POST['apell'][$i].'<br /></td>';
echo "<td>".$_POST['fono'][$i].'<br /></td>';
}
}
else
echo "
<tr>
<td></td>
<td></td>
<td></td>
</tr>";
?>
<tr>
<td><input type='text' name='nombre[]'></td>
<td><input type='text' name='apell[]'></td>
<td><input type='text' name='fono[]'></td>
</tr>

</table>
<input type='submit' name='insertar' value='insertar'>
</form>
</body>
</html>



pero al parecer solamente me toma los ultimos valores del arreglo que puedo hacer ?