Why is this PHP code showing up as regular text (html)? -


i've been staring @ hour , last resort hoping of guys might give me hand figuring out php code showing regular text in html file? appreciated.

http://jsfiddle.net/yyh27/

<?php         $name = $_post['name'];         $email = $_post['email'];         $message = $_post['message'];         $from = 'from:';          $to = '';          $subject = 'hello';         $human = $_post['human'];          $body = "from: $name\n e-mail: $email\n message:\n $message";          if ($_post['submit'] && $human == '4') {                              if (mail ($to, $subject, $body, $from)) {              echo '<p>your message has been sent!</p>';         } else {              echo '<p>something went wrong, go , try again!</p>';          }          } else if ($_post['submit'] && $human != '4') {         echo '<p>you answered anti-spam question incorrectly!</p>';         }     ?> 

i see 2 possibilities:

a) not running on server, on local pc. if case , don't have acces websapce, @ wamp (windows) or mamp (mac)

b) have .html-file-extension instead of .php

if it's neither of these, give more information you're runnng script, how it's saved , everything. php should never show plain text because of error inside php - merley because of errors surrounding php.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -