I've used this contact form multiple times with no problems whatsoever. When I used it with godaddy's hosting it's not sending me an email. I'm receiving no errors. What's wrong with this code? It's on the internet now at: http://www.minutestodisney.com/contact.html.
::Verification::
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain the number '+min+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
} }
//-->
</script>
::::The Actual Form::::
<div id="contact_table">
<form action="contactthanks.php" method="post">
<table width="450" border="0" cellspacing="10">
<td width="440" align="left"><label for="name">*Name:</label><br /><input type="text" name="name" id="name" /></td>
</tr>
<tr>
<td align="left"><label for="city">Phone:</label>
<br /><input type="text" name="city" id="city" /></td>
</tr>
<tr>
<td align="left"><label for="email">*Email:</label><br /><input type="text" name="email" id="email" /></td>
</tr>
<tr>
<td align="left"><label for="message">*Message:</label><br /><textarea name="message" rows="10" cols="40" id="message"></textarea></td>
</tr>
<td align="left"><label for="answer">*Type in the following answer to the question:<br />2 + 2 =</label><br /><input type="text" name="answer" id="answer" /></td>
<tr>
<td align="left"><input name="submit" type="submit" class="submit-button" onclick="MM_validateForm('name','','R','email','','RisEmail','answer','','RinRange4:4','message','','R');return document.MM_returnValue" value="Submit" /></td>
</tr>
</table>
</form>
* are required fields
</div>
</div>
:::::THANK YOU PAGE WITH PHP::::::
<?php
if(isset($_POST['submit'])) {
$to = "
[email protected]";
$subject = "Disney Contact Form";
$name_field = $_POST['name'];
$phone_field = $_POST['phone'];
$email_field = $_POST['email'];
$message = $_POST['message'];
$body = "From: $name_field\n E-Mail: $email_field\n Phone: $phone_field\n Message:\n $message";
echo "";
mail($to, $subject, $body);
} else {
echo "Go back";
}
?>