Please correct your: " . implode(", ", $errorArray) . ".";
}
else {$nameerror = '';$emailerror = '';$addresserror = '';$cityerror = '';$stateerror = '';$ziperror = '';$charityerror = '';}
//$nameentry $emailentry $addressentry $cityentry $statestring $zipentry $charitystring
//Declarate the necessary variables
if ($fail == false) {
$mail_to='acronkhite@recellular.com';
$mail_from=$emailentry;
$mail_sub='Old Phones for Charity - donation notification.';
$mailtextlong = "\r\n" . "Name:" . "\r\n" . $nameentry . "\r\n" . "\r\n" . "Email: " . "\r\n" . $emailentry . "\r\n" . "\r\n" . "Address:" . "\r\n" . $addressentry . "\r\n" . "\r\n" . "City:" . "\r\n" . $cityentry . "\r\n" . "\r\n" . "State:" . "\r\n" . substr($statestring,2) . "\r\n" . "\r\n" . "Zip:" . "\r\n" . $zipentry . "\r\n" . "\r\n" . "Donation intended for:" . "\r\n" . $charitystring;
$mail_mesg= wordwrap($mailtextlong,70);
$receipt_to=$emailentry;
$receipt_from='no-reply@oldphonesforcharity.com';
$receipt_sub='Old Phones for Charity - donation to ' . $charitystring;
$receipttextlong = "\r\n" . $nameentry . "," . "\r\n" . "Thanks for your donation to " . $charitystring . "\r\n" . "\r\n" . "Please remember to mail your phones as soon as possible." . "\r\n" . "\r\n" . "- Old Phones for Charity";
$receipt_mesg= wordwrap($receipttextlong,70);
//Check whether the submission is made & Check for success/failure of delivery
if(mail($mail_to,$mail_sub,$mail_mesg, "From:$mail_from" . "\r\n" . "Reply-to:$mail_from") && mail($receipt_to,$receipt_sub,$receipt_mesg, "From:$receipt_from" . "\r\n" . "Reply-to:$receipt_from")) {
echo "
Thanks! An Email Receipt has been sent to " . $emailentry . ".
This page should print automatically - if it doesn't, use your browser's print dialog to print this label.
"; $sent = true; } else { echo 'didnt send'; } } if ($sent == false) { echo $errorString; include 'includes/forminc.php'; } ?>
From: echo isset($_REQUEST['nameentry']) ? $_REQUEST['nameentry'] : '' ?>
echo isset($_REQUEST['addressentry']) ? $_REQUEST['addressentry'] : '' ?>
echo isset($_REQUEST['cityentry']) ? $_REQUEST['cityentry'] : '' ?>
echo isset($_REQUEST['statestring']) ? $_REQUEST['statestring'] : '' ?>
echo isset($_REQUEST['zipentry']) ? $_REQUEST['zipentry'] : '' ?>
For: echo isset($_REQUEST['charitystring']) ? $_REQUEST['charitystring'] : '' ?>