•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 425,982 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,640 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 4986 | Replies: 0
![]() |
•
•
Join Date: Sep 2004
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
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> </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 < Porters Restaurant, Inc. > All rights reserved.
</FONT>
</body>
</html>
<?
}
?>
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> </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 < Porters Restaurant, Inc. > All rights reserved.
</FONT>
</body>
</html>
<?
}
?>
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
advertisment blog browser cell competition daniweb email encryption eu eudora firefox gentoo gmail google imap linux microsoft mobile mozilla news onecare open source opinion outlook penelope phishing phones php professional research scam security spam spammers spamming stocks technology thunderbird virus web webmail
- Sending pic attachments via PHP form (PHP)
- CDOSYS Form to Email Formatting (ASP)
- Sending HTML email via PHP mail function (PHP)
- ASP: Sending a HTML form to an email address (ASP)
- Help with asp form will not display contact information (ASP)
- form-to-email in Dreamweaver (Community Introductions)
- creating Contact form to email and txt file (PHP)
Other Threads in the PHP Forum
- Previous Thread: Problems installing Cash Mod for Php-Nuke 7.2
- Next Thread: Good PHP Tutorial


Linear Mode