addition pour total d'un panier
bonjour desolé j'ai perdu mon mot de passe et j'ai plus le nom de domaine associéj'ai du creer un nouveau compte. ( mon ancien compte apprenti-fab)
j'ai fait un panier et je voudrais avoir le total mais je suis bloquer
voila mon code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
$q=mysql_query("SELECT * FROM panier WHERE id_me ='$id_me'");
if (mysql_num_rows($q) !=0)
{
echo '<table border="0" align="left"><tr bgcolor="#FFDC98"><td><p>Photo </p></td>';
echo'<td><p>Quantité </p></td>';
echo '<td><p> Description</p></td>';
echo '<td><p>Taille</p></td>';
echo '<td><p>Couleur</p></td>';
echo '<td><p>Prix Normal</p></td>';
echo '<td><p>Prix Club</p></td>';
echo '<td><p>Total</p></td>';
echo '<td><p>Modifier</p></td>';
echo '<td><p>Supprimer</p></td></tr>';
while ($d=mysql_fetch_array($q))
{
echo '<td width="110"><p><img src="ventes_images/'.$d[imageProduit].'.jpg" border="0" width="100" alt="'.$d[NomProduit].'"></p></td>';
echo '<form action="panier.php" method="post">';
echo '<td><input class="bouton" type="text" name="nb" size="2" maxlength="2"value="'.$d[QteProduit].'"></td>';
echo '<td>'.$d[NomProduit].'</td>';
echo '<td>'.$d[TailleProduit].'</td>';
echo '<td>'.$d[CouleurProduit].'</td>';
echo '<td>'.$d[PrixNormal].'</td>';
echo '<td>'.$d[PrixProduit].'</td>';
$Total=$d[PrixProduit]*$d[QteProduit];
echo '<td>'.$Total.' </td>';
echo '<td><p> <input name="cmdModifierQtePanier" type="submit" value="Modifier"></p></td>';
echo '<input type="hidden" name="txtIdPanier" value="'.$d['IdPanier'].'"></form>';
echo '<td><form><input name="cmdSupprimerQtePanier" type="submit" value="supprimer"><input type="hidden" name="txtIdPanier" value="'.$d['IdPanier'].'"></form></td></tr>';
}
echo '</table></div>';
}
else
echo'<h3 style="color:#0000C0">Votre panier est vide</h3>'; |
j'ai donc le total de chaque produit mais je voudrais le taotal de tous les produits .
est ce qu'un ame charitable pourrais me venir en aide.
il me faut le total du panier.
merci
fabien