Esta es la unica solucion que funciona que he encontrado. Pero esta muy rara porque en el primer $_REQUEST['procesar'] hay que poner comillas simples y en el segundo $_REQUEST[texto] no hay que ponerlas. Si no lo hago asi no funciona.
Código PHP:
<body>
<?PHP
if (isset($_REQUEST['procesar']))
{
echo "El texto Ingresado es : $_REQUEST[texto]";
}
else
{
?>
<form action= "procesar.php" method = "POST">
<input type = "text" name="texto">
<input type = "submit" name="procesar" value="Enviar">
</form>
<?PHP
}
?>
</body>
Quiero hacerlo de la forma, pero me da errores
Código PHP:
<html>
<Body>
<?
if (isset(($_POST['boton'])
{
echo "El apellido Ingresado es : $_apellido";
}
else
{
?>
<form action= "form1.php" METHOD = "POST">
<input type= "text" NAME="apellido">
<input type= "submit" NAME="boton" VALUE="Ejecutar">
</form>
<?
}
?>
</body>
</html>