Backup of the original Clockwatchers PHP Tutorial:
www.clockwatchers.com/php_main.html
Please consult the original if still available.
Clockwatchers PHP Tutorial - Sending Email
This section builds on the forms section by adding new
functionality. This time, we will not only collect data, we'll emailed
it. The PHP mail() function handles this.
The Form:
The above form allows people to enter their name, favorite color and
email address. Once they click the button, that data is sent to
hello.php for processing.
hello.php:
The above PHP generates the email, sending it to test@example.com with
"Your subject line goes here" in the subject line. The From & Reply-to
are set to the senders address.
The actual email contains something like the below:
Sender's name: Barney
Sender's favorite color: purple
You would replace the $recipient value with your own email address.