session_start();
$session_id__=session_id();
$id_session=session_id();
$dbhost = "localhost"; # Mysql Database host
$dbuname = "mafma"; # Mysql user
$dbpass = "mafma"; # Mysql password
$dbname = "Mafma"; # Mysql Database name
mysql_pconnect($dbhost, $dbuname, $dbpass);
@mysql_select_db("$dbname") or die ("Unable to select database");
$table_caddie="commandes_caddies";
$recup_all=mysql_query("select * from $table_caddie where session_id='$session_id__'");
$auth="abng";
$auth="abng";
if (mysql_num_rows($recup_all)==0) {
header ("location: index.php");
}
include ("mainfile.php");
dbconnect();
$fp=fopen("commandes/$session_id__.dat","w+");
$datenow= date("d/m/Y");
$str ="
Vous
avez commandé les produits suivants.
Vous recevrez sous 3 jours un email qui confirmera
votre commande. You ordered the following items :
You'll receive an email to confirm your order whithin 3 days.
Code Code
Echelle Scale
Type Type
Fabricant Manufacturer
Marque Model
Description Description
Prix
unitaires (euro) Unit
prices (euro)
Qté Qty
Sous
total (euro) Sub
total (euro)
$lala=mysql_query("SELECT CodeProduit, Echelle, Type, Fabricant, Marque, Description, total_HT, total_TTC, qte from commandes_caddies where session_id='$id_session'");
while (list($CodeProduit,$Echelle,$Type,$Fabricant,$Marque,$Description,$total_HT,$total_TTC,$qte)=mysql_fetch_row($lala)) {
$SousTotal€=$total_HT*$qte;
$str .="