Bonjour,

J'essaye d'envoyer un mail php, contenant une le résultat d'une requête mysql.

pour faire simple, un utilisateur se connecte au site, et via le script panier.php, il récupère tout les articles le concernant et l'affiche dans une table récursif :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
<table'><tr>
<th>Quantités</th>
<th>Produits</th>
<th>Prix Unitaire</th>
<th>Prix Total</th>
</tr>
 
<?php
mysql_connect("$host", "$sqllogin", "$sqlpassword")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$login=$_SESSION['login'];
$requete = mysql_query("SELECT * FROM $tbl_name WHERE ident = '$login'");
while ($donnees = mysql_fetch_array($requete))
{
?>
<tr>
<td><strong><?php echo $donnees['quant']; ?></strong></td>
<td><strong><?php echo $donnees['produit']; ?></strong></td>
<td><strong><?php echo $donnees['prix']; ?> &euro;</strong></td>
<td><strong><?php echo $donnees['prix_total']; ?> &euro;</strong></td>
</tr>
</table>
Je souhaiterais donc récupérer toutes les informations, et envoyer tout ça par mail.

J'ai essayer (par curiosité) un : $mail = file_get_contents('panier.php');
mais apparemment cela ne fonctionne pas...

Pouvez-vous m'aider ?
amicalement,
Fabien493