Jump to content

Reply to sender


harshadmethrath

Recommended Posts

I want to be able to reply to the sender of the information ( the guy who fills the form online ).

 

your help is much appreciated. here's the code

 

 

<?php
if(isset($_POST['submit'])) {

$from = 'From: [email protected]'; 
$to = "[email protected]";
$subject  =  "Website Contact Form"; 
$name_field = $_POST['name'];
$email_field  = $_POST['email'];
$address_field = $_POST['address'];
$address2_field = $_POST['address2'];
$city_field = $_POST['city'];
$state_field = $_POST['state'];
$zip_field =$_POST['zip'];
$company_field =$_POST['company'];
$IATA_field =$_POST['IATA'];
$phone_field =$_POST['phone'];
$fax_field =$_POST['fax'];
$mail_from="$email";
$response1_field =$_POST['response1'];
$areacode_field =$_POST['areacode'];
$comments_field =$_POST['comments'];

$body = "From: $name_field\n E-Mail: $email_field\n Address:\n $address_field Address2:\n $address2_field City:\n $city_field State:\n $state_field Zip:\n $zip_field Company:\n $company_field IATA:\n $IATA_field Phone:\n $phone_field Fax:\n $fax_field Visited Resort:\n $response1_field Area code:\n $areacode_field Comments:\n $comments_field'";

echo  "Your Information has been submitted to $to!";
mail($to, $subject, $body);

} else {

echo "Please try again after some time...";

}
?>

 

 

Link to comment
https://forums.phpfreaks.com/topic/222838-reply-to-sender/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.