# Contact form auto responder

**URL:** <https://forum.kirupa.com/t/contact-form-auto-responder/237784>\
**Category:** Uncategorized\
**Created:** [September 3, 2007, 11:08pm UTC](https://forum.kirupa.com/t/contact-form-auto-responder/237784 "2007-09-03T23:08:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonmilburn](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jasonmilburn/32/3117_2.png) [@jasonmilburn](https://forum.kirupa.com/u/jasonmilburn)\
**Post date:** [September 3, 2007, 11:08pm UTC](https://forum.kirupa.com/t/contact-form-auto-responder/237784/1 "2007-09-03T23:08:26Z")

</div>

I created a php contact form at [http://www.rogerworthington.com](http://www.rogerworthington.com) . It works fine, however the client also wants the form to email to the person who filled it out. I tried a couple things that didn’t work. Any help would be appreciated. Here is the php code:

\<?php  
if(isset($\_POST[‘Submit’])) {  
$to = “[jason@jasonmilburn.com](mailto:jason@jasonmilburn.com)”;  
$subject = “MESOTHELIOMA Request For More Information”;  
foreach($\_POST[‘check’] as $value) {  
$check\_msg .= "Checked: $value  
";  
}  
$type = $\_POST[‘type’];  
$ifother = $\_POST[‘ifother’];  
$name\_field = $\_POST[‘name’];  
$phone = $\_POST[‘phone’];  
$confirmphone = $\_POST[‘phone2’];  
$email\_field = $\_POST[‘email’];  
$confirmemail = $\_POST[‘email2’];  
$address\_field = $\_POST[‘address’];  
$city\_field = $\_POST[‘city’];  
$state\_field = $\_POST[‘state’];  
$zip\_field = $\_POST[‘zip’];  
$time = $\_POST[‘time’];  
$claim = $\_POST[‘claim’];  
$exposed = $\_POST[‘exposed’];

$body = "Diagnosed with Mesothelioma? $check\_msg

Type of Mesothelioma: $type

If Other: $ifother

Name: $name\_field

Phone: $phone

COnfirm Phone: $confirmphone

E-Mail: $email\_field

Confirm E-Mail: $confirmemail

Address: $address\_field

City: $city\_field

State: $state\_field

Zip Code: $zip\_field

Best Time To Call: $time

Claim is For: $claim

I was exposed to Asbestos: $exposed

";

echo “Thank you for contacting us.”;  
mail($to, $subject, $body);  
} else {  
echo “Error!”;  
}  
?\>
