I'm having issues with this contact form. I've used it several different times with no problems on different hosting. Now when I put it on Godaddy it doesn't work. I even uploaded it to my own personal hosting and it works perfect.. Just not on godaddy. I'm not sure if there's a problem with the code or what. I'm lost of what it could be. Does anyone know what I should look for? I'm frustrated over here..
Here's the code. It's simple..
<?php
if(isset($_POST['submit'])) {
$to = "lillizzierae@aol.com";
$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";
}
?>
This is the form.
<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>