html - posting to .php downloads instead of showing up -


ok i'm new php.here i'm trying do. here index.html

<html>    <body>       <form action="welcome.php" method="post">           name: <input type="text" name="fname">           age: <input type="text" name="age">           <input type="submit">        </form>    </body> </html> 

i'm posting welcome.php

<html>    <body>       welcome <?php echo $_post["fname"]; ?>!<br>       <?php echo $_post["age"]; ?> years old.    </body> </html> 

but instead of showing page, downloads welcome.php

make sure server has php installed. if have php installed, try restarting server.


Comments

Popular posts from this blog

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -