hoachen Posted June 20, 2006 Share Posted June 20, 2006 I am looking for php tutorials for confirmation email. I want to create a very simple form that contains name: email: phone: When the user click on submit. This user name, email address, phone number will email to my account and at the sametimes, a confirmation email will send to the email address that they fill out. on this confirmation email will "say thank you for filling out the form"I been looking for quite a while but no luck at all. I hope someone done this before and point me to the right place to learn this.thank you very much to whoever try to help.kenny Link to comment Share on other sites More sharing options...
justsomeguy Posted June 20, 2006 Share Posted June 20, 2006 All you are doing is sending 2 emails. Search this forum for email forms, or search php.net for the mail function. Link to comment Share on other sites More sharing options...
PHPJack77 Posted June 20, 2006 Share Posted June 20, 2006 I am looking for php tutorials for confirmation email. I want to create a very simple form that contains name: email: phone: When the user click on submit. This user name, email address, phone number will email to my account and at the sametimes, a confirmation email will send to the email address that they fill out. on this confirmation email will "say thank you for filling out the form"I been looking for quite a while but no luck at all. I hope someone done this before and point me to the right place to learn this.thank you very much to whoever try to help.kenny<{POST_SNAPBACK}> This will do what you want it to (I didn't test it, but it should work )... You will need to modify it if you want to add error checking if you want to... I'm working on that part myself right now...<?php $name = $_POST['name']; $phone = $_POST['phone']; $email = $_POST['email']; $to = "youremailaddress@yourserver.com"; $subject = "SUBJECT TO YOURSELF HERE"; $subjecttousr = "SUBJECT TO THE USER HERE"; $message = "<b>Name:</b> " . $name . "<br /><br />"; $message .="<b>Phone Number:</b> " . $phonenumber . " <br /><br />"; $message .="<b>Email Address:</b> " . $email . " <br /><br />"; $messagetousr = "Thank you for filling out the form"; $headers="MIME-Version: 1.0\r\n"; $headers.="Content-type: text/html;"; $headers.=" Charset=iso-8859-1 \r\n"; $headers.="From: $email \r\n"; mail ($to, $subject, $message, $headers); mail ($email, $subjecttousr, $messagetousr, $headers);?> Link to comment Share on other sites More sharing options...
hoachen Posted June 20, 2006 Author Share Posted June 20, 2006 Well, your code is fine and working!Thank you very much for your kindness to share!cheers!hoachenThis will do what you want it to (I didn't test it, but it should work )... You will need to modify it if you want to add error checking if you want to... I'm working on that part myself right now... <?php $name = $_POST['name']; $phone = $_POST['phone']; $email = $_POST['email']; $to = "youremailaddress@yourserver.com"; $subject = "SUBJECT TO YOURSELF HERE"; $subjecttousr = "SUBJECT TO THE USER HERE"; $message = "<b>Name:</b> " . $name . "<br /><br />"; $message .="<b>Phone Number:</b> " . $phonenumber . " <br /><br />"; $message .="<b>Email Address:</b> " . $email . " <br /><br />"; $messagetousr = "Thank you for filling out the form"; $headers="MIME-Version: 1.0\r\n"; $headers.="Content-type: text/html;"; $headers.=" Charset=iso-8859-1 \r\n"; $headers.="From: $email \r\n"; mail ($to, $subject, $message, $headers); mail ($email, $subjecttousr, $messagetousr, $headers);?> <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
PHPJack77 Posted June 20, 2006 Share Posted June 20, 2006 You got it! Glad I could help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now