Page 1 of 1

E-MAIL FUNCTION?? Help pwease!

Posted: Sat Sep 21, 2002 7:06 pm
by austin0369
Ok, what im trying to make is a feed back forum, you can see it at http://www.beyond-reason.net/aaa/forum.html for the names and stuff.

How do you make it so when they press send it sends both areas to an e-mail address? Hopefully that makes sense. Thanks in advance

Posted: Sat Sep 21, 2002 7:25 pm
by Agent Dwarf
Hi austin,

at the beginning of your FormHandler.php script, add:

if(isset($_POST['email'], $_POST['feedback'])) {
mail($_POST['email'], 'Feedback from: ' . $_POST['email'], $_POST['feedback'], 'From: ' . $_POST['email']);

An example e-mail would show up as:

From: joeshmoe@something.com
Subject: From joeschmore@something.com

Hello, this is a test!

Posted: Sat Sep 21, 2002 9:01 pm
by austin0369
Well, i dont want it to send an e-mail to them, i want it to send an e-mail to ME at lets say austin@something.com

Posted: Sat Sep 21, 2002 10:36 pm
by Agent Dwarf
Oops! :oops:

Code: Select all

$myemail = "austin@something.com";

if(isset($_POSTї'email'], $_POSTї'feedback'])) { 
      mail($myemail, 'Feedback from: ' . $_POSTї'email'], $_POSTї'feedback'], 'From: ' . $_POSTї'email']);
}