Bonjour à tous,
je cherche à envoyer le contenu d'un panier d'achat grâce à mail().
Pour ça, j'ai tenté de définir le contenu du mail comme ça :
où la fonction EnvoiCommande() est mon panier php :
Bon, mais y'a rien qui passe ; le mail est vide.
J'imagine que j'utilise pas la bonne méthode mais je ne sais pas du tout comment faire…
Quelqu'un pourrait-il m'aider ?
Merci d'avance
fschaff
je cherche à envoyer le contenu d'un panier d'achat grâce à mail().
Pour ça, j'ai tenté de définir le contenu du mail comme ça :
$message=EnvoiCommande();
où la fonction EnvoiCommande() est mon panier php :
function EnvoiCommande(){
if (creationPanier())
{
$nbArticles=count($_SESSION['panier']['libelleProduit']);
if ($nbArticles <= 0)
echo "<p>Votre panier est vide</p>";
else
{
echo "<table border=\"0\" cellspacing=\"1\" cellpadding=\"0\">";
echo "<tr>";
echo "<th>libellé</th>";
echo "<th>caractéristiques</th>";
echo "<th>quantité</th>";
echo "<th>prix/plaque</th>";
echo "</tr>";
for ($i=0 ;$i < $nbArticles ; $i++)
{
echo "<tr>";
echo "<td class=\"tableproduit\">".htmlspecialchars($_SESSION['panier']['libelleProduit'][$i])."</ td>";
echo "<td class=\"tableproduit\">".($_SESSION['panier']['caracProduit'][$i])."</ td>";
echo "<td class=\"tableproduit\"><input type=\"text\" size=\"4\" name=\"QteArticle[]\" value=\"".htmlspecialchars($_SESSION['panier']['qteProduit'][$i])."\"/></td>";
echo "<td class=\"tableproduit\">".htmlspecialchars($_SESSION['panier']['prixProduit'][$i])." euros</td>";
echo "</tr>";
}
echo "</table>";
}
}
}
Bon, mais y'a rien qui passe ; le mail est vide.
J'imagine que j'utilise pas la bonne méthode mais je ne sais pas du tout comment faire…
Quelqu'un pourrait-il m'aider ?
Merci d'avance
fschaff