harshadmethrath Posted November 3, 2010 Share Posted November 3, 2010 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"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/217662-reply-email-for-this-form/ Share on other sites More sharing options...
DavidAM Posted November 3, 2010 Share Posted November 3, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/217662-reply-email-for-this-form/#findComment-1129940 Share on other sites More sharing options...
harshadmethrath Posted November 3, 2010 Author Share Posted November 3, 2010 yeah...right now i am receiving it from the last email i created in the server. i want to recieve it directly from the sender. can you please copy my codes and insert your code in the appropriate place. thanks a lot Quote Link to comment https://forums.phpfreaks.com/topic/217662-reply-email-for-this-form/#findComment-1129961 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.