<?php
    
# This is the php3 script that takes the form information from account.php3
    # and emails it to user@example.org.

    # The form data gets passed in as variables with the same name as
    # the Name= option in the INPUT tag.

    # First we assign some regular variables
    
$mailto "user@example.org";
    
$subject "New Account Requst";

    
# The following creates a string to be used as the message body.
    #
    # Notice the first mailbody gets assigned with an equal sign and
    # the following are assinged with a dot-equal sign.  The .= operator
    # appends new data to an existing string.
    #
    # The \n creates a newline just like the C language.
    #
    
$mailbody "The following is a request for a new account.\n\n";
    
$mailbody .= "Firstname: $Firstname\n";
    
$mailbody .= "Lastname: $Lastname\n\n";
    
$mailbody .= "Email address: $email\n\n";
    
$mailbody .= "Requested username: $username\n";
    
$mailbody .= "Requested password: $password\n\n";
    
$mailbody .= "IP Address: $IP\n";

    
# The function actually sends the mail
    
mail($mailto$subject$mailbody);
?>

<HTML>
<HEAD>
<TITLE>User Request Submitted</TITLE>
</HEAD>

<BODY BgColor="#FFCCAA" Text="#000000">

<H1>Request accepted</H1>

<P>We have accepted your request for a new account.

<P>We will notify you via email when your account
is ready.

<P>Please call xxx-xxxx if you don't hear back within 24 hours.

</BODY>
</HTML>