Hi, i created a PHP form, and I have a simple newbie question of how to send a notification to the one who filled up the form. Please do help me This is my sample php code: $Name = $_POST['Name']; $Email = $_POST['Email']; $Message = $_POST['Message]; $header = "Blah Blah"; $subject = "Blah Blah"; $email_to = "blah@blah.com"; $message= "Name: $Name E-mail: $Email $ Message: $Message"; // Send the form to me @mail($email_to, $subject ,$message ,$header ) ; Code (markup): That's my php code, but i can't figure it out how to send a confirmation message to the sender.. I know this is pretty easy, but I suck as it... I can make it work I tried this one: $header2 = "Blah Blah"; $subject2 = "Blah Blah"; $email_to2 = "$Email"; $message2= "Name: $Name @mail2($email_to2, $subject2 ,$message2 ,$header2 ) ; Code (markup): But it doesn't work
headers need to be properly formatted, heres an example of some properly formatted headers <?php $headers = "Content-type: text/html\r\n". "From: Your Name <you@you.com>"; PHP: additionally most servers require that the <from> email address is an existing email address associated with your domain name, unless you have catch all emails setup.
What about the personalized message? how can I put that to be sent to the one who filled up the form? For instance $messageforthesender = "Thank you for completing the form" then send to the $Email of the sender... Is that easy?
Thanks, it works! Another question... How can I make the font weight of the message text to be bold what I did is $message= "<b>Sample Message</b>"; Code (markup): But it doesn't work... need help
Next time, when you post within 5 minutes of each other, just edit the damn thing. Secondly, read this: (and do so in the future) http://us2.php.net/manual/en/function.mail.php