lillizzierae Posted April 5, 2013 Share Posted April 5, 2013 (edited) 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 April 5, 2013 by lillizzierae Quote Link to comment Share on other sites More sharing options...
Jessica Posted April 5, 2013 Share Posted April 5, 2013 You're not even checking if the mail call was successful. Quote Link to comment Share on other sites More sharing options...
lillizzierae Posted April 6, 2013 Author Share Posted April 6, 2013 As straight-forward as I can get; I'm extremely dumb when it comes to php. So I need a better explanation, sorry. I've just been using the form with literally no problems and emails get sent. Quote Link to comment Share on other sites More sharing options...
Jessica Posted April 6, 2013 Share Posted April 6, 2013 Mail() returns a true or false value. Quote Link to comment Share on other sites More sharing options...
lillizzierae Posted April 6, 2013 Author Share Posted April 6, 2013 Ok, then what are you suggesting I do? Quote Link to comment Share on other sites More sharing options...
Jessica Posted April 6, 2013 Share Posted April 6, 2013 Check to see which one it was. Quote Link to comment Share on other sites More sharing options...
Ken_GoDaddy Posted April 17, 2013 Share Posted April 17, 2013 @lillizzierae, I'm with Go Daddy and came across your post. Have you been able to resolve your contact form concerns? If not or if you have any additional questions, please feel free to reply or to send me a private message. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.