I created a form page with MS Frontpage and a PHP file to send the form content via email. However when I tested the form, the php file was not executed. Instead the browser shows the source code of the php file. This is not a server problem because I tested other php forms, and they ran fine. Please help...
sendcontactus.php:
<?php
$msg = "Name:\t$post[Name]\n";
$msg .="Title:\t$post[Title]\n";
$msg .="Company:\t$post[Company]\n";
$msg .="Address:\t$post[Address]\n";
$msg .="City:\t$post[City]\n";
$msg .="State:\t$post[State]\n";
$msg .="Zipcode:\t$post[Zipcode]\n";
$msg .="Country:\t$post[Country]\n";
$msg .="Telephone:\t$post[Tel]\n";
$msg .="Fax:\t$post[Fax]\n";
$msg .="Email:\t$post[Email]\n";
$msg .="MessageType:\t$post[MessageType]\n";
$msg .="Subject:\t$post[Subject]\n";
$msg .="SubjectOther:\t$post[SubjectOther]\n";
$msg .="Comment:\t$_post[Comment]\n";
$recipient = "will_dai@millenniumpacific.com";
$subject = "Contact US Feedback";
$mailheaders = "From: <$_post[Email]> \n";
mail($recipient, $subject, $msg, $mailheaders);
echo "<HEAD><TITLE>Form Sent!</TITLE></HEAD><BODY>";
echo "<H1 align=center>Thank You, $_POST[Name]</H1>";
echo "<P align=center>Your feedback has been sent.</P>";
echo "</BODY>";
?>
contactus.htm
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Tell us what you think about our web site</title>
<meta name="Microsoft Theme" content="blends 011">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=us-ascii\" /> <meta name=\"robots\" content=\"noindex,nofollow\" /> <title>" . $form["title"] . "</title><style type=\"text/css\">\n";
print " BODY {" . $form['bgcolor'] . $form['text_color'] . "}\n";
if(isset($form['link_color']))
print " A {" . $form['link_color'] . $form['bgcolor'] . "}\n";
if(isset($form['alink_color']))
print " A:active {" . $form['alink_color'] . $form['bgcolor'] . "}\n";
if(isset($form['vlink_color']))
print " A:visited {" . $form['vlink_color'] . $form['bgcolor'] . "}\n";
print " .title {font-size: 12pt; font-weight: bold}\n";
print " </style> <link rel=\"stylesheet\" href=\"" . $form['css'] . "\">
</head>
<body>
<p>Tell us what you think about our web site, our products, our organization, or
anything else that comes to mind. We welcome all of your comments and
suggestions.</p>
<form action="sendContactus.php" method="POST" name="Contact US">
<p><strong>What area would you be interested in?</strong></p>
<dl>
<dd><input type="radio" name="MessageType" value="Products" checked>Products <input type="radio" name="MessageType" value="Orders">Orders
<input type="radio" name="MessageType" value="Shipping">Shipping
<input type="radio" name="MessageType" value="Suggestion">Suggestion</dd>
</dl>
<p><strong>What about us do you want to comment on?</strong></p>
<dl>
<dd><select name="Subject" size="1">
<option selected>Web Site</option>
<option>Company</option>
<option>Products</option>
<option>Orders</option>
<option>Shipping</option>
<option>(Other)</option>
</select> Other: <input type="text" size="26" maxlength="256" name="SubjectOther"></dd>
</dl>
<p><strong>Enter your comments in the space provided below:</strong></p>
<dl>
<dd><textarea name="Comments" rows="5" cols="42"></textarea></dd>
</dl>
<p><strong>Tell us how to get in touch with you:</strong></p>
<dl>
<dd>
<table width="333">
<tr>
<td width="67">Name
<td width="255"><input type="text" size="35" maxlength="256" name="Name">
</tr>
<tr>
<td width="67">Title
<td width="255"><input type="text" size="35" maxlength="256" name="Title">
</tr>
<tr>
<td width="67">Company
<td width="255"><input type="text" size="35" maxlength="256" name="Company">
</tr>
<tr>
<td width="67">Address
<td width="255"><input type="text" size="35" maxlength="256" name="Address">
</tr>
<tr>
<td>City
<td><input type="text" size="35" maxlength="256" name="City">
</tr>
<tr>
<td>State
<td><input type="text" size="35" maxlength="256" name="State">
</tr>
<tr>
<td>Zip Code
<td><input type="text" size="35" maxlength="256" name="Zipcode">
</tr>
<tr>
<td>Country
<td><input type="text" size="35" maxlength="256" name="Country">
</tr>
<tr>
<td width="67">Tel
<td width="255"><input type="text" size="35" maxlength="256" name="Telephone">
</tr>
<tr>
<td width="67">Fax
<td width="255"><input type="text" size="35" maxlength="256" name="Fax">
</tr>
<tr>
<td width="67">E-mail
<td width="255"><input type="text" size="35" maxlength="256" name="Email">
</tr>
</table>
</dd>
</dl>
<dl>
<dd> These are required fields.</dd>
<dt>Or send us <a href="mailto:contact@millenniumpacific.com">email </a></dt>
</dl>
<p><input type="submit" value="Submit Comments"> <input type="reset" value="Clear Form"></p>
<input type="hidden" name="recipient" value="contact@millenniumpacific.com">
<input type="hidden" name="Contact US" value="Contact US Form inputs">
</form>
<h5>Copyright © 2000 Millennium Pacific Inc. All rights reserved.<br>
Revised: <!--webbot bot="TimeStamp" S-Type="EDITED"
S-Format="%B %d, %Y" -->
.</h5>