--- Pushpinder Singh Garcha <[EMAIL PROTECTED]> wrote:
> Hi
>
> I am trying to create an online survey using PHP
> ...I am using MySQL as
> the database and MAC OS Jaguar. I do not need the
> results to be added to
> the database. I need to be able to send the results
> of the survey to an
> email address....I know that this is possible using
> MS FrontPage but
> with PHP I am not so sure. Please help.

The last time I did this, I did something like the following.  Note that it
all starts out with an HTML form with fields called "name" and "question1". 
The form action called a page containing the following.

<!-- SEND EMAIL -->
<?
$to .= "<[EMAIL PROTECTED]>";
$subject = "This is the subject";
$message = "This is the message....

Name: $name
Question 1: $question1";

$headers .= "From: Me <[EMAIL PROTECTED]>\r\n";
$headers .= "Cc: [EMAIL PROTECTED]\r\n";

mail($to, $subject, $message, $headers);
?>
<!--END SEND EMAIL -->


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

Reply via email to