$texte. ='</table>
$texte. ='</table>
<?php
$str="";
do {
$str.='<tr>';
$str.='<td><div align="center">'.$nomArti.'</div></td>';
$str.='<td><div align="center">'.$prixUni.'</div></td>';
$str.='<td><div align="center">'.$Qu.'</div></td>';
$str.='<td><div align="center">'.$prixArti.'</div></td>';
$str.='</tr>';
} while ($row_Recordset4 = mysql_fetch_assoc($Recordset4)); ?>
Tout marche correctement ? (laisse la concaténation de $texte)
$nomf=$row_Recordset2['nomfac'];
$prenomf=$row_Recordset2['prenomfac'];
$adressef=$row_Recordset2['adressefac'];
$villef=$row_Recordset2['villefac'];
$cpf=$row_Recordset2['cpfac'];
$telf=$row_Recordset2['telfac'];
$mailf=$row_Recordset2['mailfac'];
$nom=$row_Recordset1['nom'];
$prenom=$row_Recordset1['prenom'];
$adress=$row_Recordset1['adresse'];
$ville=$row_Recordset1['ville'];
$cp=$row_Recordset1['cp'];
$tel=$row_Recordset1['tel'];
$mail=$row_Recordset1['mail'];
$clientID=$row_Recordset3['ID'];
$date=$row_Recordset3['date'];
$total=$row_Recordset3['totalcom'];
$nomArti=$row_Recordset4['nomArti'];
$prixUni= $row_Recordset4['prixUni'];
$Qu=$row_Recordset4['Qu'];
$prixArti=$row_Recordset4['prixArti'];
$adresse = "monmail";
$sujet = "Confirmation de votre commande\n\n";
$texte='<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p> '.$etatC.' '.$nom.' '.$prenom.',</p>
<p>Merci d\'avoir passé commande chez <strong>ATLANTIC BARS<strong>
<strong><br>Conservez ce mail car il tient lieu de facture. </strong></p>
<table width="429" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="225">Commande n° '.$clientID.'</td>
<td width="204">du '.$date.' </td>
</tr>
</table>
<br>
<table width="559" border="0" cellspacing="0">
<tr>
<td width="166"><div align="center">Désignation</div></td>
<td width="138"><div align="center">Prix Unitaire </div></td>
<td width="112"><div align="center">Quantité</div></td>
<td width="135"><div align="center">Prix Article </div></td>
</tr>
<tr>
<td>---------------------------</td>
<td>-----------------------</td>
<td>------------------</td>
<td>----------------------</td>
</tr>
</table>
---------------------------------------------------------------------------------------------------------------<br>
<table width="581" border="0" cellspacing="0">
<tr>
<td width="202"> </td>
<td width="375">
<table width="284" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="118" align="center">Total T.T.C :</td>
<td width="166" align="center">'.$totalc.'</td>
</tr>
</table>
</td>
</tr>
</table>
<p><strong>Adresse de livraison :</strong></p>
<p><strong>Nom :</strong> '.$nom.'<br>
<strong>Prenom : </strong>'.$prenom.'<br>
<strong> Adresse : </strong>'.$adress.'<br>
<strong>Code postal : </strong>'.$cp.'<br>
<strong>Ville : </strong>'.$ville.'<br>
<strong>Téléphone : </strong>'.$tel.'<br>
<strong>Mail :</strong> '.$mail.'</p>
<p><strong>Adresse de facturation :</strong><br>
<br>
<strong>Nom :</strong> '.$nomf.'<br>
<strong>Prenom : </strong>'.$prenomf.'<br>
<strong>Adresse : </strong>'.$adressef.'<br>
<strong>Code postal :</strong> '.$cpf.'<br>
<strong>Ville : </strong>'.$villef.'<br>
<strong>Téléphone : </strong>'.$telf.'<br>
<strong>Mail :</strong> '.$mailf.'<br>
<p>Merci de votre visite, en espérant vous revoir bientôt.</p>
</body>
</html>';
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: '.mailf.'\n";
mail ($adresse, $sujet, $texte,$headers);
monMailEnHtml = '<table>';
for($i = 0; $i < $tantQuYEnA; $i++) {
monMailEnHtml .= '<tr>';
monMailEnHtml .= '<td>'.$i.'</td>';
monMailEnHtml .= '</tr>';
}
monMailEnHtml .= '</table>';
echo monMailEnHtml; // pour vérifier le html généré.
// Affiche :
//<table><tr><td>0</td></tr><tr><td>1</td></tr><tr><td>2</td></tr>...</table>
mail($to, $monMailEnHtml, $headersQuiVontBien, ...); // envoi le mail en htmlCode : Tout sélectionner
$html.=</tr>';
do { ;
$html.=" <tr> ";
$html.=' <td><div align="center">'.$nomArti.'</div></td> ';
$html.='<td><div align="center">'.$prixUni.'</div></td>';
$html.='<td><div align="center">'.$Qu.'</div></td>';
$html.='<td><div align="center">'.$prixArti.'</div></td> ';
$html.="</tr>";
} while ($row_Recordset4 = mysql_fetch_assoc($Recordset4));
$html.='</table>
<?php
$html.='</tr>';
do {
$html.= '<tr>';
$html.=' <td><div align="center">';
$html.="{$row_Recordset4['nomArti']}";
$html.='</div></td> ';
$html.='<td><div align="center">';
$html.= "{$row_Recordset4['prixUni']}";
$html.='</div></td>';
$html.='<td><div align="center">';
$html.="{$row_Recordset4['Qu']}";
$html.='</div></td>';
$html.='<td><div align="center">';
$html.="{$row_Recordset4['prixArti']}";
$html.='</div></td>';
$html.='</tr>';
} while ($row_Recordset4 = mysql_fetch_assoc($Recordset4));
$html.='</table>';
?>