ChaoticMage-DDC
January 5th, 2004, 06:39 PM
Since im pretty much a noob to php scripting i went ahead and had one of my buddies help me with a script i needed for a website. The script worked great on IIS 5.0 and Windows 2000 using CGI. Since upgrading to windows 2003 i had to switch over to ISAPI and i had to make some major changes to the script for it to post data to my database.
The question i have is, since i added the .$post function to my values portion of the script what do i have to change in my emailer portion so when the email is recieved it shows the data that was posted from the webased form.
Here is part of the code.
<?php //connect to DB here
$table="member";
include("includes/connect.inc");
$query = "INSERT INTO $MySQL_Table (company_name,company_address,contact_name,contact _email,contact_phone,qty,payment_method,comments)
VALUES ('".$_POST['company_name']."', '".$_POST['company_address']."', '".$_POST['contact_name']."', '".$_POST['contact_email']."', '".$_POST['contact_phone']."', '".$_POST['qty']."', '".$_POST['payment_method']."', '".$_POST['comments']."')";
$result = mysql_query($query);
if ($result)
{
?><body bgcolor="#FFCCCC">
<p align="center"><font size="2"><strong><font size="6">Thank You for your order.</font></strong></font>
<p align="center"><font size="3"> It has completed successfully. An Email response
will be delivered shorty to your contact email address.<br>
Please read the email carefully for payment instructions.</font><br />
<?php
// Email confirmation to Owner
$mailtext = " A New Order has been entered\n
Company Name: $company_name
Company Address: $company_address
Contact Name: $contact_name
Contact Email: $contact_email
Contact Phone: $contact_phone
QTY: $qty
Payment Method: $payment_method
Comments: $comments
If you notice this email confirmation portion it has the $company_name etc. which use to reffer to my values ('$company_name', '$company_address etc..
Hopefully someone can help me.
thanks.
The question i have is, since i added the .$post function to my values portion of the script what do i have to change in my emailer portion so when the email is recieved it shows the data that was posted from the webased form.
Here is part of the code.
<?php //connect to DB here
$table="member";
include("includes/connect.inc");
$query = "INSERT INTO $MySQL_Table (company_name,company_address,contact_name,contact _email,contact_phone,qty,payment_method,comments)
VALUES ('".$_POST['company_name']."', '".$_POST['company_address']."', '".$_POST['contact_name']."', '".$_POST['contact_email']."', '".$_POST['contact_phone']."', '".$_POST['qty']."', '".$_POST['payment_method']."', '".$_POST['comments']."')";
$result = mysql_query($query);
if ($result)
{
?><body bgcolor="#FFCCCC">
<p align="center"><font size="2"><strong><font size="6">Thank You for your order.</font></strong></font>
<p align="center"><font size="3"> It has completed successfully. An Email response
will be delivered shorty to your contact email address.<br>
Please read the email carefully for payment instructions.</font><br />
<?php
// Email confirmation to Owner
$mailtext = " A New Order has been entered\n
Company Name: $company_name
Company Address: $company_address
Contact Name: $contact_name
Contact Email: $contact_email
Contact Phone: $contact_phone
QTY: $qty
Payment Method: $payment_method
Comments: $comments
If you notice this email confirmation portion it has the $company_name etc. which use to reffer to my values ('$company_name', '$company_address etc..
Hopefully someone can help me.
thanks.