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

php - How to serve a file for download on WordPress -

how to share virtual sharepoint server and get it in host windows and visual studio? -