Jump to content

reply email for this form


harshadmethrath

Recommended Posts

I want to be able to reply to the email of the sender ( of the form )

 

heres the codes

<?php

 

$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));

 

// Checkbox handling

$field_1_opts = $_POST['field_1'][0].",". $_POST['field_1'][1];

 

mail("[email protected]","Invitation - Form submission","Form data:

 

rooms: $field_1_opts

First Name: " . $_POST['fname'] . "

Last Name: " . $_POST['lname'] . "

Your Email: " . $_POST['email'] . " 

Phone Number: " . $_POST['pnumber'] . "

Request your arrival date: " . $_POST['field_2'] . "

Request your departure date: " . $_POST['field_3'] . "

Please send me an ownership package: " . $_POST['field_4'] . "

 

",$headers); include ("confirm.html");

 

?>

Link to comment
https://forums.phpfreaks.com/topic/217662-reply-email-for-this-form/
Share on other sites

Are you saying that when you receive the email sent by this code, you want to be able to click the REPLY button and send a reply to the email address entered on the form by the user?  If so, you need to add a "Reply-To" header:

 

$headers .= 'Reply-To: ' . $_POST['email'] . "\r\n";

 

You really need to sanitize the user entries through. Especially any that you put in the headers.

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.