I have a webshop. People will out their form and add their address.
mail($email, $subject, $MailMsg, $mailheaders);
$MailMsg = "
$clientname
$address";
now in the "mailMsg" I also want to include the products that the person ordered, but how can I add the content of a "while" into there?
I have no problems displaying it but how can I add it simply to the email?
here is how I get the data from the database.
$result = mysql_query("select * from shop WHERE sessionid='$sessionId'") or die ("could not read news database");
if ($result)
{
while ($row = mysql_fetch_array($result))
{
print ($row["nummer"]);
print ($row["title"]);
}}
thanks