E-MAIL FUNCTION?? Help pwease!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
austin0369
Forum Newbie
Posts: 19
Joined: Tue Aug 20, 2002 5:56 pm

E-MAIL FUNCTION?? Help pwease!

Post 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
Agent Dwarf
Forum Newbie
Posts: 9
Joined: Sat Sep 21, 2002 2:03 pm

Post 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!
austin0369
Forum Newbie
Posts: 19
Joined: Tue Aug 20, 2002 5:56 pm

Post 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
Agent Dwarf
Forum Newbie
Posts: 9
Joined: Sat Sep 21, 2002 2:03 pm

Post 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']);
}
Post Reply