desmintaylor
09-06-2012, 04:13 AM
I am beyond frustrated. I coded a contact form that submits to my email address when the submit button is pressed. I used it on multiple sites for my clients, but for this one client's site, it just won't send!
I know the code has to be fine because I copied and pasted it from my site and tested it through many others I built. Now when I try and test the form, it doesn't submit to my email address.
The client purchased her domain and hosting through namecheap. I think it has something to do with namecheap, but that sounds silly because a host/domain provider should not effect my code. I have no clue what is causing this. The only difference between the site I am coding now and the ones I coded before is this one is a .org rather than .com or .net.
Someone please help me! I tried namecheap "customer support" three times and spent over four hours getting slow unhelpful responses from them.
Here is my code, if someone can help or find an alternate method for me, I'd appreciate it.
<?php
$to = "myemail@emails.com";
$subject = "GHoops Registration Form";
$fname = $_REQUEST['fname'] ;
$lname = $_REQUEST['lname'] ;
$school = $_REQUEST['school'] ;
$grade = $_REQUEST['grade'] ;
$coach = $_REQUEST['coach'] ;
$address = $_REQUEST['address'] ;
$city = $_REQUEST['city'] ;
$state = $_REQUEST['state'] ;
$zipcode = $_REQUEST['zipcode'] ;
$phone = $_REQUEST['phone'] ;
$email = $_REQUEST['email'] ;
$dob = $_REQUEST['dob'] ;
$height = $_REQUEST['height'] ;
$shirt = $_REQUEST['shirt'];
$PG = $_REQUEST['PG'] ;
$SG = $_REQUEST['SG'] ;
$SF = $_REQUEST['SF'] ;
$F = $_REQUEST['F'] ;
$C = $_REQUEST['C'] ;
$parentname = $_REQUEST['parentname'] ;
$contactnumber = $_REQUEST['contactnumber'] ;
$parentemail = $_REQUEST['parentemail'] ;
$choice = $_REQUEST['choice'] ;
$message1 = $_REQUEST['message1'] ;
$message2 = $_REQUEST['message2'] ;
$signature = $_REQUEST['signature'] ;
$date = $_REQUEST['date'] ;
$headers = "From: $fname $lname";
$message = <<< END
First Name: $fname
Last Name: $lname
School: $school
Grade: $grade
Coach: $coach
Address: $address
City: $city
State: $state
Zip Code: $zipcode
Phone Number: $phone
Email Address: $email
Date of Birth: $dob
Height: $height
Position: $PG $SG $SF $F $C
Parent Name: $parentname
Is Parent Primary Contact?: $choice
Primary Contact's Information: $message1
Medical History: $message2
Signature: $signature
Date: $date
END;
$sent = mail($to, $subject, $message, $headers) ;
?>
Thanks.
I know the code has to be fine because I copied and pasted it from my site and tested it through many others I built. Now when I try and test the form, it doesn't submit to my email address.
The client purchased her domain and hosting through namecheap. I think it has something to do with namecheap, but that sounds silly because a host/domain provider should not effect my code. I have no clue what is causing this. The only difference between the site I am coding now and the ones I coded before is this one is a .org rather than .com or .net.
Someone please help me! I tried namecheap "customer support" three times and spent over four hours getting slow unhelpful responses from them.
Here is my code, if someone can help or find an alternate method for me, I'd appreciate it.
<?php
$to = "myemail@emails.com";
$subject = "GHoops Registration Form";
$fname = $_REQUEST['fname'] ;
$lname = $_REQUEST['lname'] ;
$school = $_REQUEST['school'] ;
$grade = $_REQUEST['grade'] ;
$coach = $_REQUEST['coach'] ;
$address = $_REQUEST['address'] ;
$city = $_REQUEST['city'] ;
$state = $_REQUEST['state'] ;
$zipcode = $_REQUEST['zipcode'] ;
$phone = $_REQUEST['phone'] ;
$email = $_REQUEST['email'] ;
$dob = $_REQUEST['dob'] ;
$height = $_REQUEST['height'] ;
$shirt = $_REQUEST['shirt'];
$PG = $_REQUEST['PG'] ;
$SG = $_REQUEST['SG'] ;
$SF = $_REQUEST['SF'] ;
$F = $_REQUEST['F'] ;
$C = $_REQUEST['C'] ;
$parentname = $_REQUEST['parentname'] ;
$contactnumber = $_REQUEST['contactnumber'] ;
$parentemail = $_REQUEST['parentemail'] ;
$choice = $_REQUEST['choice'] ;
$message1 = $_REQUEST['message1'] ;
$message2 = $_REQUEST['message2'] ;
$signature = $_REQUEST['signature'] ;
$date = $_REQUEST['date'] ;
$headers = "From: $fname $lname";
$message = <<< END
First Name: $fname
Last Name: $lname
School: $school
Grade: $grade
Coach: $coach
Address: $address
City: $city
State: $state
Zip Code: $zipcode
Phone Number: $phone
Email Address: $email
Date of Birth: $dob
Height: $height
Position: $PG $SG $SF $F $C
Parent Name: $parentname
Is Parent Primary Contact?: $choice
Primary Contact's Information: $message1
Medical History: $message2
Signature: $signature
Date: $date
END;
$sent = mail($to, $subject, $message, $headers) ;
?>
Thanks.