html - PHP file doesn't run -


i have 2 files:
index.html

<html> <body>  <form action="welcome.php" method="post"> name: <input type="text" name="name"><br> e-mail: <input type="text" name="email"><br> <input type="submit"> </form>  </body> </html> 

and welcome.php

<html> <body>  welcome, <?php echo $_post["name"]; ?><br> email address is: <?php echo $_post["email"]; ?>  </body> </html> 


this example there

when user fills form , hits "enter" should display:

welcome, the_name_you_enter email address address_you_enter 

but me displays welcome.php source code (i using safari 7). knows why?

this happens because php file not executed on web server or php not enabled on webserver.

you trying access file directly using file://

take @ mamp (i assuming using os x)


Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -