Bonjour à tous, voilà mon pb : j'ai un pb d'affichage de certaines variables dans mon code
$headers ='From: "webmaster "<
[email protected]>'."\n";
$headers .='Reply-To:
[email protected]'."\n";
$headers .='Content-Type: text/html; charset="iso-8859-1"'."\n";
$headers .='Content-Transfer-Encoding: 8bit';
$message ='<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body>
<span style="font-weight: bold;">Commande n°</span> '.$_POST['ID_commande'].'
<br>
<span style="font-weight: bold;">en date du </span> '.$date_creation.'
<br>
<span style="font-weight: bold;">Client n°</span> '.$ID_client.'
<br>
<span style="font-weight: bold;">
<span style="text-decoration: underline;">
mode de paiement</span> : </span>
par chèque pour un montant de '.$_POST['totalttc'].' €<br>
<br>
<span style="font-weight: bold;"><span style="text-decoration: underline;">adresse de livraison</span> :
'.$nom.', '.$prenom.'
<br>
'.$adresse1.'<br>
'.$adresse2.'<br>
'.$cp.' '.$ville.'<br>
<br>
<span style="font-weight: bold;">détails de la commande en se connectant en admin </span><br>
</body>
</html>
';
if(mail(''.$email.'','commande n° '.$_POST['ID_commande'].'',$message,$headers))
{
echo 'Merci pour votre commande.';
}
donc tout fonctionne car je reçois l'email mais certaines variables ne s'affichent pas et voilà le résultat :
Commande n° AR3004201082
en date du vide
Client n° CL060420106
mode de paiement : par chèque pour un montant de 87.2 €
adresse de livraison : vide , vide
vide
vide
détails de la commande en se connectant en admin
Je pense que l'encapsulage doit dérailler mais pas trouvé !!
Si vous avez une idée ? merci
Bonjour à tous, voilà mon pb : j'ai un pb d'affichage de certaines variables dans mon code
[quote]$headers ='From: "webmaster "<
[email protected]>'."\n";
$headers .='Reply-To:
[email protected]'."\n";
$headers .='Content-Type: text/html; charset="iso-8859-1"'."\n";
$headers .='Content-Transfer-Encoding: 8bit';
$message ='<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body>
<span style="font-weight: bold;">Commande n°</span> '.$_POST['ID_commande'].'
<br>
<span style="font-weight: bold;">en date du </span> '.$date_creation.'
<br>
<span style="font-weight: bold;">Client n°</span> '.$ID_client.'
<br>
<span style="font-weight: bold;">
<span style="text-decoration: underline;">
mode de paiement</span> : </span>
par chèque pour un montant de '.$_POST['totalttc'].' €<br>
<br>
<span style="font-weight: bold;"><span style="text-decoration: underline;">adresse de livraison</span> :
'.$nom.', '.$prenom.'
<br>
'.$adresse1.'<br>
'.$adresse2.'<br>
'.$cp.' '.$ville.'<br>
<br>
<span style="font-weight: bold;">détails de la commande en se connectant en admin </span><br>
</body>
</html>
';
if(mail(''.$email.'','commande n° '.$_POST['ID_commande'].'',$message,$headers))
{
echo 'Merci pour votre commande.';
}[/quote]
donc tout fonctionne car je reçois l'email mais certaines variables ne s'affichent pas et voilà le résultat :
[quote]Commande n° AR3004201082
en date du [color=#FF0000]vide[/color]
Client n° CL060420106
mode de paiement : par chèque pour un montant de 87.2 €
adresse de livraison : [color=#FF0000]vide[/color] , [color=#FF0000]vide[/color]
[color=#FF0000]vide[/color]
[color=#FF0000]vide[/color]
détails de la commande en se connectant en admin
[/quote]
Je pense que l'encapsulage doit dérailler mais pas trouvé !! :|
Si vous avez une idée ? merci