Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,250 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 2,203 people online right now. Registration is fast and FREE... Join Now!




mailing form

 
Reply to this topicStart new topic

mailing form, information to be emailed

caliba
10 Oct, 2008 - 06:27 AM
Post #1

New D.I.C Head
*

Joined: 9 Jul, 2008
Posts: 5


My Contributions
Hi there,
This will probably take someone 2 seconds but I have made a form in DW MX which is a join out mailing list. It has name and email and I want the info emailed to the gmail account, but it only sent the gmail account an email from the email form and doesn't put the name anywhere. How can I make the code email the name section in the message? I'm totally new to php and don't undertand it at all, I'm surprised I got this far.
Thanks
Liz

<?php
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;

mail( "mintymeetsmunt@gmail.com", "Feedback Form Results - Mailing list",
$message, "From: $email" );
header( "Location: http://www.mintymeetsmunt.com/contact2.htm" );
?>
User is offlineProfile CardPM
+Quote Post

pemcconnell
RE: Mailing Form
10 Oct, 2008 - 07:41 AM
Post #2

D.I.C Regular
Group Icon

Joined: 5 Aug, 2008
Posts: 396



Thanked: 37 times
Dream Kudos: 75
My Contributions
Tried this and it worked fine:

CODE

<?php
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$subject = "Feedback Form Results - Mailing list";
$header = "From: ".$email;
$to = "mintymeetsmunt@gmail.com";
$message = "Message";

mail($to, $subject, $message, $header);
header( "Location: http://www.mintymeetsmunt.com/contact2.htm" );
?>

User is offlineProfile CardPM
+Quote Post

gothik12
RE: Mailing Form
10 Oct, 2008 - 09:38 AM
Post #3

D.I.C Head
Group Icon

Joined: 10 Nov, 2007
Posts: 114



Thanked: 2 times
Dream Kudos: 25
My Contributions
This is a version (CLICK) of a contact form just like that you would like to make, but it is secured ... you will have just to change in the code the $email_admin from the script's beginning into yours ($email_admin = "mintymeetsmunt@gmail.com") .

P.S.: Don't scare about the Romanian language on the site. Just click on download. If you understand PHP, it will be easy for you to read through the code

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 04:06AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month