I have created an online gift certificate order from.
I have an html to allow user to create order,
and two php pages to:

  1. display order back to browser window,and
  2. send email with order info to restaurant owner and myself
    and redirect to thanks.htm page.

I cannot get the order details to display in the e-mail message.
This happens despite my coding the quantity variables as
{$_POST['totalqty']} and {$_POST['totalamount']}.

Anyway, can anyone help me?
Here is my code...

THANKS!

<?php
if ($_POST['radio_group_1'] == 'A')
{ 
$mail_msg = "
Porters Restuarant Gift Certificate Order Form\n
Customer has ordered $_POST['twofiveqty']} gift certificates for ${$_POST['totalamount']}. \n

";

/*
$mail_msg = "Porters Restuarant Gift Certificate Order Form\n\n";
$mail_msg .= "Customer has ordered {$_POST['twofiveqty']} gift certificates for ${$_POST['totalamount']}.\n\n";
*/

$name = "Tom Fitzsimmons";
$email = "t4632@erieinsurance.com";
$subject = "Porter's Gift Certificate Order";
  mail( "cookies@micro-link.net,psutom@micro-link.net", $subject, 
    $mail_msg, "From: $name <$email>" );
  header( "Location: http://www.portersrestaurant.net/thanks.htm" );
  }
else
{
    ?>

    <html>
<head>
<title>Porter's Restaurant</title>

<style>
a { text-decoration: none; color: #0000FF; }
</style>

<script language="JavaScript">
function turnOn(currentLink) {
    currentLink.style.color = "#990000";
    currentLink.style.textDecoration = "underline";
}

function turnOff(currentLink) {
    currentLink.style.color = "#0000FF";
    currentLink.style.textDecoration = "none";
}
</script>
</head>

<body bgcolor="#f5f5f5" link="#000033" vlink="#000033" alink="#000033" background="MarbleB2.jpg">

<table border="0" width="60%" align="center">
    <tr>
        <td><center><a href="about.htm" style="color:#483d8b"
                     onmouseover="this.style.fontWeight='bold';" onmouseout="this.style.fontWeight='normal';">About Us</a></center></td>
        <td><center><font color="#483d8b">|</font></center></td>
        <td><center><a href="mailto:cookies@micro-link.net?subject=Porter's Restaurant"  style="color:#483d8b"
                     onmouseover="this.style.fontWeight='bold';" onmouseout="this.style.fontWeight='normal';">E-mail
        us!</a></center></td>
        <td><center><font color="#483d8b">|</font></td>
        <td><center><font color="#483d8b"><a href="menu.htm" style="color:#483d8b"
                     onmouseover="this.style.fontWeight='bold';" onmouseout="this.style.fontWeight='normal';">
                     Menus</a></font></td>
        <td><center><font color="#483d8b">|</font></td>
        <td><center><a href="index.html" style="color:#483d8b" onmouseover="this.style.fontWeight='bold';" 
                     onmouseout="this.style.fontWeight='normal';">Home</a></center></td>
        <td><center><font color="#483d8b">|</font></td>
       <td><center><a href="banquets.htm" style="color:#483d8b"
                     onmouseover="this.style.fontWeight='bold';" onmouseout="this.style.fontWeight='normal';">
                     Banquets</font></td>            
    </tr>
</table>
<br>
<table border="0" width="65%" cols="1" align="center">
<tr>
<td align="center">
<img src="Porters_Logo.jpg" alt="Porter's Restaurant" border="0" width="132" height="124">
</a>
</td>
</tr>
</table>
<br>
<table align="center">
<tr>
<td>
<h3>Sorry you have cancelled your order.</h3>
<td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td align="center"><a href="index.html"><h4>HOME</h4></a></td>
</tr>
</table>
</h2>

<p align="center"><FONT COLOR="#483d8b" SIZE=-1>
Contents ©2004 &nbsp; < Porters Restaurant, Inc. > &nbsp;All rights reserved.
</FONT>

</body>
</html>

   <?
  }

?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.