[PHP] email form results

2004-12-21 Thread Ken Bolton
Is there a simple way to send the results of a form to an email address? I
have created a form with multiple categories of radio boxes and I have
created a response PHP file that will give the user a confirmation. I'm just
not sure how to send the results through email. I've checked the
documentation with no luck. Thanks.


RE: [PHP] email form results

2004-12-21 Thread phpninja
http://www.php.net/mail

-phpninja

-Original Message-
From: Ken Bolton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 21, 2004 10:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP] email form results

Is there a simple way to send the results of a form to an email address? I
have created a form with multiple categories of radio boxes and I have
created a response PHP file that will give the user a confirmation. I'm just
not sure how to send the results through email. I've checked the
documentation with no luck. Thanks.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] email form results

2004-12-21 Thread Miles Thompson
Assemble all of your data into the message body (see $message below) and 
mail it to yourself.
How you trigger this processing and the call to the mail() function depends 
on how you've constructed your logic.

$message .= $name .\n;
$message .= $phone . \n;
$message .= $email;
 mail( [EMAIL PROTECTED], Free Trial Request,
 $message, From: $email );
One logic construct is for the form's ACTION to call itself, like so:
IF $email is NOT set
display the form and to record the information
ELSEIF test for critical fields being empty
displaying a message if they are and a reload button
ELSE
to the code above
display Thanks  we'll be in touch, or whatever.
Regards - Miles Thompson
At 02:10 PM 12/21/2004, Ken Bolton wrote:
Is there a simple way to send the results of a form to an email address? I
have created a form with multiple categories of radio boxes and I have
created a response PHP file that will give the user a confirmation. I'm just
not sure how to send the results through email. I've checked the
documentation with no luck. Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] email form results

2004-12-21 Thread Richard Lynch
Ken Bolton wrote:
 Is there a simple way to send the results of a form to an email address? I
 have created a form with multiple categories of radio boxes and I have
 created a response PHP file that will give the user a confirmation. I'm
 just
 not sure how to send the results through email. I've checked the
 documentation with no luck. Thanks.

http://php.net/mail should do the trick.

If that's not enabled on your server, and can't be, but you have access to
an SMTP server somewhere, http://phpclasses.org/ has several fine PHP
mailing objects.

Oh, and you may want to read the PHP FAQ, especially the part about using
$_POST to snatch all the POST data in a few lines of code.  Very handy.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php