Si os fijais arriab tengo otro input solitario...
El caso es que solo me capata las variables de primer input solitario y las variables de dentro del bucle no me las pasa, me da error y me dice que no estan asignadas...
Sabeis como puedo resolver este problema? alguna alternativa para pasar las variables que necesito?
Muchas gracias.
ESTE ES EL FORMULARIO
Código PHP:
<?php
echo "<table>";
echo "<tr>";
echo "<td width='200' height='25'>Nunmero de Comensales</td><td width='200' height='25'><input type='text' name='var1' size='7'></td>";
echo "</tr>";
echo "</table>";
?>
<?php
echo "<table>";
for($i=0;$i<$filas_entrant;$i++)
{
echo "<tr>";
echo "<td width='363' height='25'>Prueba</td><td width='76' height='25'>12€</td><td width='79' height='25'><input type='text' name='variable.".$i."' size='7'></td>";
echo "</tr>";
}
echo "</table>";
?>
Este es el archivo donde van las variables...
Código PHP:
<?php
foreach($_POST as $nom => $valor){
$asignacion="\$".$nom."='".$valor."';";
eval($asignacion);
}
echo $var1;
echo $variable1;
echo $variable2;
echo $variable3;
?>