Hi
I've got a simple shopping cart at
When you go to the checkout how do i send the "Total $" amount to my email when i submit the form.
my form allready works. it sends me the name email etc - just won't send me the $totalCost variable. Heres is the PHP that the form goes to when submit is clicked.
Thanks
Ben
PHP:
<?php
include ("db.php");
__//create short variable names
__$name=$HTTP_POST_VARS['name'];
__$email=$HTTP_POST_VARS['email'];
__$feedback=$HTTP_POST_VARS['feedback'];
__$totalCost=$HTTP_POST_VARS['totalCost'];
__$toaddress = '[email protected]';
__$subject = 'Feedback from web site';
__$mailcontent = 'Customer name: '.$name."\n"
_________________.'Customer email: '.$email."\n"
_________________."Customer comments: \n".$feedback."\n"
________________ ."Customer price: \n".$totalCost."\n";
__$fromaddress = 'From: [email protected]';
__mail($toaddress, $subject, $mailcontent, $fromaddress);
?>
<html>
<head>
__<title>Bob's Auto Parts - Feedback Submitted</title>
</head>
<body>
<h1>Feedback submitted</h1>
<p>Your feedback has been sent.</p>
</body>
</html>
?>
I've got a simple shopping cart at
When you go to the checkout how do i send the "Total $" amount to my email when i submit the form.
my form allready works. it sends me the name email etc - just won't send me the $totalCost variable. Heres is the PHP that the form goes to when submit is clicked.
Thanks
Ben
PHP:
<?php
include ("db.php");
__//create short variable names
__$name=$HTTP_POST_VARS['name'];
__$email=$HTTP_POST_VARS['email'];
__$feedback=$HTTP_POST_VARS['feedback'];
__$totalCost=$HTTP_POST_VARS['totalCost'];
__$toaddress = '[email protected]';
__$subject = 'Feedback from web site';
__$mailcontent = 'Customer name: '.$name."\n"
_________________.'Customer email: '.$email."\n"
_________________."Customer comments: \n".$feedback."\n"
________________ ."Customer price: \n".$totalCost."\n";
__$fromaddress = 'From: [email protected]';
__mail($toaddress, $subject, $mailcontent, $fromaddress);
?>
<html>
<head>
__<title>Bob's Auto Parts - Feedback Submitted</title>
</head>
<body>
<h1>Feedback submitted</h1>
<p>Your feedback has been sent.</p>
</body>
</html>
?>
Comment