Que tal PedroRodas prueba de esta forma:
Código PHP:
<html>
<Body>
<?
if (isset($_POST['boton']))
{
$apellido = $_POST['apellido'];
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>
Saludos.