Estoy de acuerdo contigo Avatar810 que antmegev use el que mas le acomode:
Código:
<html>
<head>
<style>
.boton{
font-size:10px;
font-family:Verdana,Helvetica;
font-weight:bold;
color:white;
background:#000000;
border:1px solid;
width:100px;
height:19px;
border-color:#fff #000 #000 #fff;
white-space:nowrap;
padding:1px;
vertical-align:middle;
}
</style>
</head>
<body>
<form id="form2" name="form2" method="POST" ACTION="<?php echo $_SERVER['PHP_SELF']?>">
Cuantas cajas de texto ocupas <input name="cuantos" type="text" value="<?echo $cuantos?>"/>
<input type="submit" value="Enviar" />
<?php
if( strtoupper( $_SERVER['REQUEST_METHOD'] ) == "POST"){
$i=1;
$cuantos=$_POST['cuantos'];
echo "<br /> <br />";
echo "<table bgcolor=\"black\" border=\"2\" >";
while ($i<=$cuantos){
echo "<tr> </tr>";
echo "<tr> <th bgcolor=\"#dddddd\">";
echo "Producto $i ";
echo "</th>";
echo "<th bgcolor=\"#2070FF\">";
echo "<input name=\"caja[$i]\" type=\"text\">";
echo "</th>";
$i=$i+1;
}
echo "</table>";
}
?>
<br />
<a href="inserta.php?cantidad=<?php echo $cuantos;?>" class="boton">INSERTAR DATOS</a>//aki haces tu codigo inserta.php en donde vas a recibir los valores de las cajas de texto, le envias cuantos para saber el numero de insets ke vas a realizar sobre la base de datos.
</form>
</body>
</html>