bellyboy22 Posted August 21, 2008 Share Posted August 21, 2008 I am trying to have a form send information to my email using php and I am not getting it right. Godaddy is saying my php is wrong. <?php if(isset($_POST['submit'])) { $firstname = $_POST['firstname'] ; $lastname = $_POST['lastname'] ; $address = $_POST['address'] ; $city = $_POST['city'] ; $state = $_POST['state'] ; $zip = $_POST['zip'] ; $primaryphone = $_POST['primaryphone'] ; $workphone = $_POST['workphone'] ; $otherphone = $_POST['otherphone'] ; $emailaddress = $_POST['emailaddress'] ; $infoSchooling = $_POST['infoSchooling'] ; $infoYear = $_POST['infoYear'] ; $infoReference = $_POST['infoReference'] ; $infoCallTime = $_POST['infoCallTime'] ; $recievemail = "chubb.gregkilian.com" ; $mailsubject = "I am interested in coming to chubb" ; $body = "First Name: $firstname\n Last Name: $lastname\n Address: $address\n City: $city\n State: $state\n Zip: $zip\n PrimaryPhone: $primaryphone\n Work Phone: $workphone\n Other Phone: $otherphone\n Email Address: $emailaddress\n I am a $infoSchooling\n Hs Grad_Ged Year: $infoYear\n I heard from you through the $infoReference\n You can call me around $infoCallTime" ; echo "Thank you $firstname for your email. We will get back to you as soon as possible" ; mail($recievemail, $mailsubject, $body); } else { echo "error go back"; } ?> can anyone tell me what I'm doing wrong Link to comment https://forums.phpfreaks.com/topic/120655-solved-im-doing-something-wrong/ Share on other sites More sharing options...
jj20051 Posted August 21, 2008 Share Posted August 21, 2008 Could I Get The Error Message You Are Getting? Link to comment https://forums.phpfreaks.com/topic/120655-solved-im-doing-something-wrong/#findComment-621723 Share on other sites More sharing options...
bellyboy22 Posted August 21, 2008 Author Share Posted August 21, 2008 /var/chroot/home/content/g/k/i/gkilian/dead.letter... Saved message in /var/chroot/home/content/g/k/i/gkilian/dead.letter Link to comment https://forums.phpfreaks.com/topic/120655-solved-im-doing-something-wrong/#findComment-621743 Share on other sites More sharing options...
MasterACE14 Posted August 21, 2008 Share Posted August 21, 2008 after <?php put error_reporting(E_ALL); Let us know what comes up then. Link to comment https://forums.phpfreaks.com/topic/120655-solved-im-doing-something-wrong/#findComment-621769 Share on other sites More sharing options...
.josh Posted August 21, 2008 Share Posted August 21, 2008 My initial guess would be $recievemail = "chubb.gregkilian.com" ; Is not a valid email format, and that is some kind of "failed to send email" message. Link to comment https://forums.phpfreaks.com/topic/120655-solved-im-doing-something-wrong/#findComment-621770 Share on other sites More sharing options...
bellyboy22 Posted August 21, 2008 Author Share Posted August 21, 2008 Notice: Undefined index: state in /home/content/g/k/i/gkilian/html/chubb/contacts_value.php on line 21 Link to comment https://forums.phpfreaks.com/topic/120655-solved-im-doing-something-wrong/#findComment-621774 Share on other sites More sharing options...
bellyboy22 Posted August 21, 2008 Author Share Posted August 21, 2008 Thanks Crayon Violent I thought I was going crazy and my php sucked.. It was because i put. instead of @ in the email slot I got into the habit of writing the url that I guess it got put into the code instead of a email address. Thank you all for your help. Link to comment https://forums.phpfreaks.com/topic/120655-solved-im-doing-something-wrong/#findComment-621777 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.