Hi there,
im quite new to php - I think Ive problems with the syntax.
I programmed a online shop in flash and I pass the variables via php.
The php files creates two mails, one to the shop owner and one to the client.
Everything works just fine - now i want to set a "for x=1, x<=99, x++" loop in the php file to sort the incoming vars and if its possible to have all the vars arranged in a HTML Table. No SQL on the server.
<?php
Mail to shop owner
$MailTo="xyz@domain.de";
// Gets the date and time from your server
$datum = date("m.d.Y - H:i:s");
mail($MailTo, "Bestellung von $vname $nname am $datum", "
Vorname:$vname
Nachname:$nname
EMAIL: $email\n
Artikelnummer/Artikel/Farbe/Größe/Kosten
$anummer1$artikelz1$color1$size1$price1\n
Gesamtbetrag:$gesamt Euro
");
MAIL to client - attach txt file
$filename = "answer.txt";
$fd = fopen( $filename, "r" );
$contents = fread( $fd, filesize( $filename ) );
fclose( $fd );
mail( "$email", "Ihre Bestellung bei xyz am $datum " , "$contents\n\n",
"From:xyz@domain.com\n" ) or print("Transmission Failure!!");
?>
Is it possible to have a Html table displayed within the mail("") command and sort the vars like dis?:
$anummer1$artikelz1$color1$size1$price1\n
$anummer2$artikelz2$color2$size2 $price2\n
$anummer3$artikelz3$color3$.............
Any hints would be nice!
Cheers
mt