1) { $message .= "s"; }
$message .= " (" . $scrow['nb'] . ")\n";
/* how base!!!
print "$scrow\n";
print_r($scrow);
print "\n\n$prow\n";
print_r($prow);
*/
$subtotal = $prow['price'] * $scrow['quantity'];
$total = $total + $subtotal;
$i++;
}
/* some address error-checking. */
if (($_POST['ship_name'] != "") &&
($_POST['ship_address'] != "") &&
($_POST['ship_email'] != "") &&
($_POST['ship_name'] != "") &&
($_POST['ship_state'] != "") &&
($_POST['ship_city'] != "") &&
($_POST['ship_ZIP'] != "")) {
if ($_POST['ship_country'] == "USA") {
$total = $total + 2;
} elseif ($_POST['ship_country'] == "CANADA") {
$total = $total + 4;
}
} elseif (($_POST['ship_name'] != "") &&
($_POST['ship_email'] != "") &&
($_POST['ship_address'] != "") &&
($_POST['ship_country'] == "other")) {
$total = $total + 8;
} else {
print "You did not fill out your address information! It's awfully important, I'm sure you can figure out why.";
print "
Please return to the shopping cart! Thanks.";
die;
}
$message .= "\n TOTAL: $" . $total;
/* Presenting that old md5 hash for verification */
$tracking = strtoupper(chunk_split($cartID, 4, " "));
$message .= "\n\nTRACKING No. " . $tracking . "\n Please keep this number handy, it is your reference code for this order.";
$message .= "\n\nShip to:\n\n";
$message .= $_POST['ship_name'] . "\n" .
$_POST['ship_address'] . "\n" .
$_POST['ship_city'] . "\n" .
$_POST['ship_state'] . "\n" .
$_POST['ship_ZIP'] . "\n" .
$_POST['ship_country'] . "\n";
$message .= "\nOrder Method: ";
if ($_POST['button'] == "Order with PayPal") {
$message .= "PayPal";
} elseif ($_POST['button'] == "Printable Check Form") {
$message .= "Check is in the mail";
}
print $message . "\n\nPlease allow 1-2 weeks for delivery.";
mail($_POST['ship_email'], "Your order from the Waletzky Shirt Store", $message,
"From: " . $_POST['ship_email'] . "\r\n" .
"Reply-To: store@waletzky.com\r\n");
mail("store@waletzky.com", "Your order from the Waletzky Shirt Store", $message,
"From: " . $_POST['ship_email'] . "\r\n" .
"Reply-To: store@waletzky.com\r\n");
?>
Print this form and enclose a check made out to "D. J. WALETZKY" (that's Waletzky with a "z.")
Then mail this check to:
44 Willoughby Street
4th Floor
Brooklyn, NY 11201