Actualy I've the problem that the content of the basket will
not be added to the variable for the mailbody. Only the 
receiver-adress and the formfields will be added to the email.
The code is attached.

How can I add a second variable for the mailbody that will
be printed out correctly to monitor the content of the email
that will be sent out.

Regards,
Ruprecht


------- Forwarded message follows -------
From:                   Ruprecht Helms <[EMAIL PROTECTED]>
To:                     [EMAIL PROTECTED]
Subject:                Procedure for submitting an order via email
Send reply to:          [EMAIL PROTECTED]
Date sent:              Tue, 01 Jun 2004 21:40:44 +0200

Hi,

I'm looking for an simple example how to send an order
(content of the basket) via email.

Does someone have such a good ans simple example.

Regards,
Ruprecht
------- End of forwarded message 
-------------------------------------------------------------------------------
Ruprecht Helms IT-Service & Softwareentwicklung

Tel./Fax +49[0]7621 16 99 16

Web:      http://www.rheyn.de
email:    [EMAIL PROTECTED]



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
  <title></title>
  <meta name="GENERATOR" content="Quanta Plus">
<style>
p  { color:#FFFFFF; font-family:Arial,Helvetica,Verdana,Sans-serif; font-size:10pt;}
tr { color:#AFAFAF: font-family:Arial,Helvetica,Verdana,Sans-serif; font-size:10pt;}
td { color:#CACACA; font-family:Arial,Helvetica,Verdana,Sans-serif; 
font-size:10pt;font-weight:bold;}
#betonung { color:#FFFF00; font-family:Arial,Helvetica,Verdana,Sans-serif; 
font-size:10pt; font-weight:bold;}
#newsheadline { color:#FFCC00; font-family:Arial,Helvetica,Verdana,Sans-serif; 
font-size:8pt;font-weight:bold;}
#news { color:#FFFFFF; font-family:Arial,Helvetica,Verdana,Sans-serif; font-size:8pt;}
#copy { color:#FFCC00; font-family:Arial,Helvetica,Verdana,Sans-serif; font-size:8pt; 
text-decoration:none;}
</STYLE>

</head>

<?
echo "<body ";
        mysql_connect("localhost","web172","fbn7__1");
        $result=mysql_db_query("usr_web172_1","SELECT * FROM choere WHERE 
ID='$chorid'");
    while ($row = mysql_fetch_object($result))
    {
        echo "bgcolor=";
        echo $row->Pagebackground;
        $temp3 = $row->Pagebackground3;
        $temp2 = $row->Pagebackground2;
        $temp1 = $row->Pagebackground;
        echo ">";

        }
?>

<body>

<?
echo "<table width='100%' height='1' bgcolor=$temp3>";
?>
  <tbody>
    <tr>
      <td>  </td>
    </tr>
  </tbody>
</table>
<?
echo "<table width='100%' height='100%' bgcolor=$temp1>";
?>
  <tbody>
    <tr>
      <td valign="top"><table cellpadding="3" cellspacing="7" border="0" width="100%">
  <tbody>
    <tr>
<?
echo    "  <td height='10' valign='top' bgcolor=$temp3>Warenkorb</td>";
echo    "  <td valign='top' bgcolor=$temp3>Bestellung</td>";
?>
 </tr>
        <tr>
<?
echo "<td valign='top' bgcolor=$temp3>";
?>
<table height="100%" width="100%" cellspacing="40" border="0">
<tr>
      <td height="55">&nbsp;
</tr>
    <tr>
      <td height="60"><? $session= 1; echo "<a 
href='basket.php?session=$session'>"?>Warenkorb</a></td>
    </tr>
    <tr>
      <td height="60"><? echo "<a 
href='artikel_show.php?chorid=$chorid'>Artikel&uuml;bersicht" ?></a></td>
    </tr>

        <tr>
      <td height="60"><h4>Bestellung</h4>  </td>
    </tr>
</table>


                </td>
<?
echo "<td  width='60%' height='100%' valign='top' bgcolor=$temp1 >";
echo "Ihre Bestellung wurde erfolgreich &uuml;bermittelt";
?>

<?


$message= "Vorname: $vorname
\nName: $name
\nStrasse:  $strasse
\n
$land;
 -
$plz $ort
\nTelefon:  $telefon
\nEmail:  $email
\n\nWarenbestellung:\n";

        mysql_connect("localhost","web172","fbn7__1");
        $result=mysql_db_query("usr_web172_1","SELECT * FROM warenkorb WHERE 
Session=$session");
        while($row=mysql_fetch_object($result))
        {

                //$message1=$message1.$row->Artikelid;

                $result1=mysql_db_query("usr_web172_1","SELECT * FROM artikel WHERE 
ID=$row->Artikelid");
                while($row1=mysql_fetch_object($result1))
                {
                        $message1="
                        $row1->Bezeichnung
                        \t
                        $row1->Menge
                        \t
                        $row1->Preis;
                        \t
                        $row1->Preis*$ro->Menge
                        \n";
                }
        }

echo "<p>";
echo $message;
echo mysql_error();
echo "</p>";
echo "<p>";
echo $message1;
echo "</p>";
$subject="Singendes Dreiland - Shopbestellung";
        mysql_connect("localhost","web172","fbn7__1");
        $result=mysql_db_query("usr_web172_1","SELECT * FROM choere WHERE 
ID='$chorid'");
    while ($row = mysql_fetch_object($result))
    {
                $to=$row->CV_Kontakt;
        }
echo "<p>";
echo $to;
echo mysql_error();
echo "</p>";
mail($to,$subject,$message.$message1);
$result=mysql_db_query("usr_web172_1","DELETE FROM warenkorb WHERE Session=$session");
?>



</td></tr>
</table>

</body>
</html>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to