Documento html llama a script php y no interpreta el codigo,si llamo a .php directamente s

KaN
30 de Septiembre del 2004
Mi duda es que tengo un form en html k pide nombre y edad y luego llama al script .php para k lo muestre por pantalla , pero no interpreta el codigo php, no muestra nada:
-----------------------------HTML---------------------------------

tml>


<title>Prueba de pagina echa en PHP</TITLE>

<body>

<form method=post ACTION="prueba.php">

Cual es tu Nombre?
<input type=text name= nombre ><br>
Edad:
<input type=text name= edad ><br>
<input type=submit>

</form>
</body>
</html>

-----------------------------prueba.php----------------------------
<html>



<body>


<?php echo $nombre ;
echo $edad ;
?>
</body>
</html>






chemon
30 de Septiembre del 2004
Prueba a poner:
echo $_POST['nombre']
PHP crea un array con las variables q recibe de un formulario. La sintaxis es $_POST['variable'] o $_GET['variable'] segun el metodo q utilices.