Bonjour à vous,

je suis à la recherche d'aide, mais je ne trouve rien du tout, je travaille actuellement sur un système de panier, mais je n'arrive pas à faire un total des sommes de mon panier.

Voici le code de ma page ci-dessous.
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
 
    <div class="container">
        <div class="shop-cart">
            <div class="table table-condensed table-striped table-responsive">
                <table class="table">
                    <thead>
                        <tr>
                            <th class="cart-product-remove"></th>
                            <th class="cart-product-thumbnail">Produit</th>
                            <th class="cart-product-name">Description</th>
                            <th class="cart-product-price">Prix unitaire</th>
                            <th class="cart-product-quantity">Quentiter</th>
                            <th class="cart-product-subtotal">Total</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $panier = $db->executeQuery('SELECT * FROM panier WHERE user_id ORDER BY id DESC ', array($userInfo[0]["id"]));
                        foreach ($panier as $paniers) { 
 
                        $produits = $db->executeQuery('SELECT * FROM produit WHERE produit = ? ORDER BY id', array($paniers["produit_id"]));
                        $images = $db->executeQuery('SELECT * FROM produit_image WHERE produit_id = ? ORDER BY id limit 1', array($paniers["produit_id"]));
                        ?>
                        <tr>
                            <td class="cart-product-remove">
                                <a href="#"><i class="fa fa-close"></i></a>
                            </td>
 
                            <td class="cart-product-thumbnail">
                                <a href="#">
                                    <img src="<?php echo $images[0]["images"]; ?>" alt="Bolt Sweatshirt">
                                </a>
                                <div class="cart-product-thumbnail-name"><b><?php echo $produits[0]["titre"]; ?></b></div>
                            </td>
 
                            <td class="cart-product-description">
 
                                <p><span><?php echo $produits[0]["titre"]; ?></span>
                                    <span>Taille: <?php echo $paniers["taille"]; ?></span>
                                    <span>Couleur: <?php echo $paniers["couleur"]; ?></span>
                                    <span>Catégorie: <?php echo $produits[0]["categorie"]; ?></span>
                                    <span>Sous catégorie: <?php echo $produits[0]["sous_categorie"]; ?></span>
                                </p>
                            </td>
 
                            <td class="cart-product-price">
                                <span class="amount"><?php echo $produits[0]["prix"]; ?>€</span>
                            </td>
 
                            <td class="cart-product-quantity">
                                <div class="quantity">
                                    <input type="button" class="minus" value="-">
                                    <input type="text" class="qty" value="<?php echo $paniers["quantiter"]; ?>" name="quantiter">
                                    <input type="button" class="plus" value="+">
                                </div>
                            </td>
 
                            <td class="cart-product-subtotal">
                                <span class="amount"><?php 
                                    $montant = ($paniers["quantiter"] * $produits[0]["prix"]);
                                    $total = 0;
                                    $total = $montant + $total;
                                    echo $total;
                                ?>€</span>
                            </td>
                        </tr>
                    <?php } ?>
                    <?php 
 
                    ?>
                    </tbody>
                </table>
            </div>
            total : (a remplacer par le code)
Voilà donc là où il y a marquait à remplacer par le code je n'y arrive pas si qu'elle qu'un peux m'aider je vous en remerciais par avance.

Bien cordialement DylanBernardOff.