Jump to content

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: contactform@nisbetplantation.com'; 
$to = "reservations@nisbetplantation.com";
$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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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