Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/04/2007, 12:20
gouki2005
 
Fecha de Ingreso: marzo-2007
Mensajes: 29
Antigüedad: 17 años, 1 mes
Puntos: 0
Pregunta AYUDA capturar nombre con FOR y array

este yo kiero hacer lo siguiente:
que un usuario me pida las cajas de texto que quiere luego meta nombre y luego se los imprima pues ya no se ke hacer llevo 3 dias tratando de hacer ke imprima.
aki esta lo ke tengo

//Con este pido el numero de cajas de texto
<html>

<head>
<title>cajas</title>
</head>
<body bgcolor="gray">
<form action="cajitasphp.php" method="POST">
<table border>
<tr><td>Escriba numero de cajas</td><td><input type="text" name="n" ></td></tr>
<tr><td><input type="SUBMIT" name="caja" values="enviar"></td></tr>
</table>
</form>
</body>
</html>

//con este se me crean las cajas y el usuario escribe los nombres
<html>
<head>
<title>Sans Titre</title>
</head>
<body bgcolor="#FFFFFF">
<form action="imprimir.php" method="POST">
<?
$cajas=$_POST["n"];
for($i=1;$i<=$cajas;$i++)
{
echo"<center><input type=\"text\" name=\"nombres$i\"></center>";
echo"<input type=\"hidden\" name=\"$cajas\">";
}
?>
<input type="SUBMIT" >
</body>
</html>


//Aqui el problema por ke no me imprime nada supuestamente guardo todo en el array para imprimirlo

<html>
<head>
<title>Sans Titre</title>
</head>
<body bgcolor="#FFFFFF">
<?
$numero=$_POST[$cajas];
$imp=array($i);
echo"$i";
echo"$numero";

?>
</body>

</html>