harshadmethrath Posted December 28, 2010 Share Posted December 28, 2010 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 More sharing options...
Maq Posted December 28, 2010 Share Posted December 28, 2010 I think this is what you're looking for (example #2): http://php.net/manual/en/function.mail.php Link to comment https://forums.phpfreaks.com/topic/222838-reply-to-sender/#findComment-1152281 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.