Help WIth Order Form
Posted: Tue Nov 28, 2006 2:30 pm
ok i fixed up some minor errors.
so the form mails but it doesnt do anything really what i need it to do is send the total price amount plsu the total quantity amount and how much purchased of each item to the email adress of that person who is making the orders. then if submittied i want it to echo thank you for shopping at lilyshop your order has been processed! and like a subtotal for each item
so the form mails but it doesnt do anything really what i need it to do is send the total price amount plsu the total quantity amount and how much purchased of each item to the email adress of that person who is making the orders. then if submittied i want it to echo thank you for shopping at lilyshop your order has been processed! and like a subtotal for each item
Code: Select all
<?php
if ($_POST) {
if (ctype_alpha($_POST['email'])) { $email = $_POST['email']; }
else $mailerror = "You must enter a valid email!<br />"; }
if (ctype_alpha($_POST['name'])) { $name = $_POST['name']; }
else $nerror = "You must enter a valid email!<br />";
if (ctype_alpha($_POST['qty'])) { $qty = $_POST['qty']; }
if (ctype_alpha($_POST['submit'])) { $submit = $_POST['submit']; }
define("NECKLACEOFTHENIGHTSKY", 50);
define("CHAINAILEFANCYBEADEDNECKLACE", 50);
define("ANTIQUEKEYNECKLACE", 30);
define("CHAINMAILEFANCYNECKLACE", 50);
define("CHAINMAILEVNECKLACE", 50);
$totalqty = 0;
$totalamount = $:0.00;
$totalqty = $NNSQTY+$CBFNQTY+$AKNQTY+$CFNQTY+$CVNQTY ;
$totalamount = $NNSQTY * NECKLACEOFTHENIGHTSKY
+$CBFNQTY * CHAINAILEFANCYBEADEDNECKLACE
+$AKNQTY * ANTIQUEKEYNECKLACE
+$CFNQTY *CHAINMAILEFANCYNECKLACE
+$CVNQTY* CHAINMAILEVNECKLACE;
mail('mowtripleh@example.com',"From: $name <$email>","Total Amount:$totalamount","Quantity Ordered:$qty");
if (mail('mowtripleh@example.com',"From: $name <$email>","Total Amount:$totalamount","Quantity Ordered:$qty"))
{ echo ("<p>Thank you for shopping at Lillys Shop! Your OrderHas Been Sent!</p>");
}
?>