Bonjour,
Je travaille actuellement sur un site e-commerce et votre tutoriel m'a était d'une grande utilité.
Mais je rencontre un problème au niveau du "refresh".
Mon site est en MVC, j'ai donc dans ma page vuePanier.php
Dans actionpanier.php j'ai rajouter les différentes action (suppression, refresh...)
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 for ($i=0 ;$i < $nbArticles ; $i++) { echo "<tr>"; echo "<td>".htmlspecialchars($_SESSION['panier']['NOMP'][$i])."</ td>"; echo "<td><input type=\"text\" size=\"4\" name=\"q\" value=\"".htmlspecialchars($_SESSION['panier']['STOCK'][$i])."\"/></td>"; echo "<td>".htmlspecialchars($_SESSION['panier']['PU'][$i])."</td>"; echo "<td><a href=\"".htmlspecialchars("./main.php?action=suppression&l=".rawurlencode($_SESSION['panier']['NOMP'][$i]))."\">Suppression</a></td>"; //echo "<td><a href='./main.php?action=refresh&q='>Rafraichir</a></td>"; echo "</tr>"; } echo "<td colspan=\"4\">"; echo "<b>Total : ".MontantGlobal()."€</b>"; echo "</td></tr>"; echo "<tr><td colspan=\"4\">"; echo "<tr><td colspan=\"4\">"; echo "<input type=\"submit\" value=\"Rafraichir\"/>"; echo "<input type=\"hidden\" name=\"action\" value=\"refresh\"/>"; echo "<a href='./main.php?action=supprimePanier'>Vider le panier</a>";
Mais je ne voie pas comment le fait de cliquer sur le bouton rafraichir la quantité modifiée est envoyé à actionpanier.php par ce code:
J'espère avoir était assez clair.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 echo "<tr><td colspan=\"4\">"; echo "<input type=\"submit\" value=\"Rafraichir\"/>"; echo "<input type=\"hidden\" name=\"action\" value=\"refresh\"/>";
Partager