Why does my contact form download its PHP script on submission?

Rob June 7, 2011
Pinterest Stumbleupon Whatsapp

My contact form definitely used to work, so I’m not sure if this is due to a recent change of server. However, submitting the contact form now causes the PHP script file to download.

There’s no doubt a very easy solution, but it’s nigh on impossible to Google for information for obvious reasons given the keywords of the problem.

Any help appreciated!

The code of the form is posted below and the respective page can be found here.

<form method=”post” action=”contact.php”>
<p>&nbsp;</p>
<p><input name=”name” type=”text” id=”name” onfocus=”if(this.value==’Your Name’) this.value=”” value=”Your Name” /></p>
<p>&nbsp;</p>
<p><input name=”EmailFrom” type=”text” id=”EmailFrom” onfocus=”if(this.value==’Your Email’) this.value=”” value=”Your Email” /></p>
<p>&nbsp;</p>
<p><textarea name=”message” cols=”” rows=”” id=”msg” onfocus=”if(this.value==’Message’) this.value=””>Message</textarea></p>
<p>&nbsp;</p>
<p><input name=”submit” src=”graphic/send.gif” alt=”” title=”submit” type=”image”/></p>
</form>
Ads by Google