Browser not running PHP script, displaying it instead

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jason9x
Forum Newbie
Posts: 1
Joined: Sun Aug 23, 2009 5:02 am

Browser not running PHP script, displaying it instead

Post by jason9x »

Hello,

I have a webpage that has a feedback form. When I press "Send Feedback" a script is supposed to run to send the comments to an email address. But whenever I press "Send Feedback" the browser displays the PHP code but does not run it. Does anyone know why this happens?

You can see it here:

http://www.sfu.ca/~jasonw/feedback.html

The PHP code was taken from thesitewizard.com

I would appreciate any help. Thank you.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Browser not running PHP script, displaying it instead

Post by jackpf »

Do you have PHP installed?

Also, if you look in your httpd.conf file (apache), do you see the line:
AddType application/x-httpd-php (should be various extensions, including .php)

Oh, and do you have any htaccess files in your directory?
Post Reply