User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Sep 2004
Posts: 1
Reputation: tomphreak is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tomphreak tomphreak is offline Offline
Newbie Poster

Sending form email

  #1  
Sep 20th, 2004
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>

<?
}

?>
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 11:33 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC