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

Join 131,779 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,961 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
post 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

Go to the top of the page

pemcconnell
post 10 Oct, 2008 - 07:41 AM
Post #2


D.I.C Regular

Group Icon
Joined: 5 Aug, 2008
Posts: 392



Thanked 35 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

Go to the top of the page

gothik12
post 10 Oct, 2008 - 09:38 AM
Post #3


D.I.C Head

Group Icon
Joined: 10 Nov, 2007
Posts: 102



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

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/20/08 02:50PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month