-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodifierpanier.php
41 lines (27 loc) · 987 Bytes
/
modifierpanier.php
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
<?php
session_start();
if(isset($_POST['submit'])){
extract($_POST);
for ($i=0; $i < count($_SESSION['commandes']) ; $i++) {
if ($_SESSION['commandes'][$i]['id'] == explode("-",$squall)[0]){
$_SESSION['commandes'][$i]['qte'] = $quantite;
$_SESSION['commandes'][$i]['total'] = $total;
break;
// echo $quantite;
// echo $total;
}
}
// foreach ($_SESSION['commandes'] as $c) {
// if ($c['id'] == explode("-",$squall)[0]){
// $c['qte']= $quantite;
// $c['total']= $total;
// }
// }
// $_SESSION['commandes'][$cpt]['id'] = explode("-",$idProduit)[0];
// $_SESSION['commandes'][$cpt]['prix'] = explode("-",$idProduit)[1];
// $_SESSION['commandes'][$cpt]['qte'] = $quantite;
// $_SESSION['commandes'][$cpt]['libelle'] = $libelle;
// $_SESSION['commandes'][$cpt]['total'] = $total;
header('location:index.php');
}
?>