Problem with code...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,

Have a question about this block of code....

<?PHP

//SETUP VARIABLES

$mailTo = "lists@xxxxxxxxxxxxxxxxxxxx";
$mailFrom = "lists@xxxxxxxxxxxxxxxxxxxx";
//These 2 can be changed IF you know what you are doing and why!
$returnPath = $mailFrom;
$replyTo = $mailFrom;
$mailSubject = "New Convention registration!";

$message = "";

//DO NOT CHANGE UNDER PENALITY OF BEING SLAPPED WITH A WET NOODLE!!!

$headers = "From: ".$mailFrom."\n";
$headers .= "Return-Path: ".$returnPath."\n";
$headers .= "Reply-To: ".$replyTo."\n";

function send_email($mailTo, $mailSubject, $mailMessage, $headers) {


    if(mail( $mailTo, $mailSubject, $mailMessage, $headers )) {

        $message = "Thank you for registering!";

    }else {
        echo "There was an issue with your registration.. Please try again later";
    }

}//Close Function


if(!empty($errorCount)) {


    }else {
            //Build Email message
            $mailmessage = "Full Name: " . $_POST['firstname'] . " " . $_POST['lastname'] . "\n\n";
            $mailmessage .= "Address: " . $_POST['address'] . "\n\n";
            $mailmessage .= "City, State, Zip: " . $_POST['city'] . " " . $_POST['state'] . " " . $_POST['zip'] . "\n\n";
            $mailmessage .= "Phone: " . $_POST['phone'] . "\n\n";
            $mailmessage .= "Email address: " . $_POST['email'] . "\n\n";
            if($_POST['affiliation'] == "NFBOther") {
                $mailmessage .= "Chapter Affiliation: " . $_POST['other'] . "\n\n";
            }else{
                $mailmessage .= "Chapter Affiliation: " . $_POST['affiliation'] . "\n\n";
            }
            if($_POST['person'] =="Other"){
                $mailmessage .= "Who will pick up the ticket? " . $_POST['Pfirstname'] . " " . $_POST['Llastname'] . "\n\n";

            }else{
                $mailmessage .= "Who will pick up the ticket? I will pick it up my self! \n\n";

            }

$mailmessage .= "Payment Method: " . $_POST['paymentMethod'];
            
        send_email($mailTo, $mailSubject, $mailmessage, $headers);
    }

?>

Sometimes... It is dropping the last $mailmessage line... The payment method in the actual email it sends...

Anyone have any ideas? I'm stumped....


Jason Pruim
lists@xxxxxxxxxxxxxxxxxxxx




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




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux