Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/05/2008, 10:59
reimonfranco
 
Fecha de Ingreso: febrero-2006
Mensajes: 858
Antigüedad: 18 años, 3 meses
Puntos: 4
Respuesta: Generar campos...

No te entendi mucho pero prueba con esto:

<html>
<head>
<title>Php5</title>
</head>
<body>
<form action="examen-abiertas.php" method="post" name="frm">
<font color="#000000" size="3" face="Gill Sans MT, Mirakel"></font><br>
<input type="text" name="num">
<input type="submit" name="btn" value="Listo!">
</form>
<?
if (isset($_POST['num']) && isset($_POST['btn'])) {
$n = $_POST['num'];
while (@$count <= $n) {
echo @"<b>$count</b> <input type='text' name='$count'><br>\n";
@$count++;
}
echo "
<form method='post'>
<input type='submit' name='btnya' value='Insertar preguntas'>
</form>
";
}
elseif (isset($_POST['btnya'])) {
echo "
<div align='center'>
<p><font size='3'face='Gill Sans MT, Mirakel'>
".$_POST['$count']."</font></p><br>

";
}
?>
<br>
</body>
</html>
__________________
*La amistad se multiplica cuando se divide*