Jump to content

Contact Form not Working on another Hosting


Recommended Posts

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 = "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";

}
?>
Edited by lillizzierae
Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.