Précédent   Forum des professionnels en informatique > PHP > Langage > Sessions
Sessions Forum d'entraide sur les sessions avec PHP. Avant de poster -> FAQ sessions, Cours sessions et Sources sécurité
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 03/03/2006, 09h50   #1
Invité de passage
 
Inscription : décembre 2005
Messages : 3
Détails du profil
Informations forums :
Inscription : décembre 2005
Messages : 3
Points : 0
Points : 0
Par défaut probleme e-commerces

bonjour avant toutes chose et merci de votre future aide si possible

je vient de fiare un site de commerce en m aiden d un livre

mon probleme est que quand je choisi un article dans mon pagnier je peu le prendre en plusieurs nombres 1,2,3 .
donc je choisi de le commander en trois exemplaires
mais dans le fichier de commande il ne prend pas en compte ces trois article
je ne c pas ce qui ce passe j ai chercher mais ne trouve pas
donc si vous pouvez m aider svp
j ai mis mes fichiers en telechargement pour voir les erreurs car je ne voi pas comment l expliquer
http://telechargeaide.cobaya.net
j ai mis le site sur
http://laboutique.cobaya.net
cobaya est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/03/2006, 10h53   #2
Membre éclairé
 
Avatar de XtofRoland
 
Inscription : août 2005
Messages : 361
Détails du profil
Informations forums :
Inscription : août 2005
Messages : 361
Points : 340
Points : 340
tu recevra sans doute plus d'aide si tu viends avec une question plus precise.
Ce que tu nous demandes exige de nous en effort certain...

je suppose que c'est le repertoire public et la page panier.php?
__________________
Le but de tout developpeur OO est de devenir une référence.
Mon avatar est un ambigramme, les curieux peuvent le retourner ;-)
Aider <> Faire a la place de!!!
XtofRoland est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 03/03/2006, 11h05   #3
m@t
Membre régulier
 
Inscription : octobre 2004
Messages : 172
Détails du profil
Informations forums :
Inscription : octobre 2004
Messages : 172
Points : 99
Points : 99
Ton problème c'est que quand tu veux ajouter plusieurs fois le même article dans ton panier, il t'ajoute plusieurs entrées (lignes) et tu voudrais qu'au lieu de cela: si l'article est déjà présent dans le panier qu'il incrémente la quantité ?
m@t est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 04/03/2006, 06h34   #4
Invité de passage
 
Inscription : décembre 2005
Messages : 3
Détails du profil
Informations forums :
Inscription : décembre 2005
Messages : 3
Points : 0
Points : 0
rebonjour et merci pour vos reponces
bon je m'explique

dans le dossier public j ai les pages php suivantes

commande.php, panier.php, ext.

mon probleme je ne vois pas d'ou il vient; je pence que cela vient d'un jeu enregistrment mais pas sur voila ce qu il ce passe:

je suis sur la page catalogue, je clique sur un article, cela me renvoie à la page fiche.php, je clique sur mon article, cela me renvoie sur la page panier.php, ou la jai :nom de l'article, choisir nombres d'article, prix de l'article,suprimer du panier.
je choisi de prendre 3 fois l'article, et clique sur commander, qui me renvoie sur la pages, commande.php, et la je me rend compte qu'il ni a pas les trois article mais un seul.
donc si vous puvez m aider cela serais super sympat merci
je vous met mes code des pages commande.php et panier.php.
voisi le code page commande
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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<?php
session_start();
$MM_authorizedUsers = "client";
$MM_donotCheckaccess = "false";
 
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  $isValid = False; 
 
  if (!empty($UserName)) { 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && false) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}
 
$MM_restrictGoTo = "login.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
  $MM_referrer .= "?" . $QUERY_STRING;
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<?php
if (!isset($_GET['commandeID'])) $_GET['commandeID']=0;
if (!isset($_SESSION['statut'])) $statut="NON IDENTIFIE";
else $statut=$_SESSION['statut'];
if (!isset($_SESSION['action'])) $action="";
else $action=$_SESSION['action'];
if (!isset($_SESSION['liste'])) $liste[]=array("VIDE",1,0,0);
else $liste=$_SESSION['liste'];
if (!isset($_SESSION['total'])) $total=0;
else $total=$_SESSION['total'];
if (!isset($_SESSION['clientID'])) $clientID=0;
else $clientID=$_SESSION['clientID'];
?>
<?php require_once('../Connections/ConnexionBoutiquemx.php'); ?>
<?php
$colname_rsRappelClient = "1";
if (isset($_SESSION['MM_Username'])) {
  $colname_rsRappelClient = (get_magic_quotes_gpc()) ? $_SESSION['MM_Username'] : addslashes($_SESSION['MM_Username']);
}
mysql_select_db($database_ConnexionBoutiquemx, $ConnexionBoutiquemx);
$query_rsRappelClient = sprintf("SELECT ID FROM clients WHERE email = '%s'", $colname_rsRappelClient);
$rsRappelClient = mysql_query($query_rsRappelClient, $ConnexionBoutiquemx) or die(mysql_error());
$row_rsRappelClient = mysql_fetch_assoc($rsRappelClient);
$totalRows_rsRappelClient = mysql_num_rows($rsRappelClient);
$clientID= mysql_result($rsRappelClient,0,'ID');
$_SESSION['clientID']=$clientID;
	if ($action=="ENREGISTRER")
	{
	mysql_select_db($database_ConnexionBoutiquemx, $ConnexionBoutiquemx);
	$insertCommande = "INSERT INTO commandes (date, clientID, total) VALUES (NOW(),'$clientID', '$total')";
	$Result1 = mysql_query($insertCommande, $ConnexionBoutiquemx) or die(mysql_error()); 
	$commandeID=mysql_insert_id();
	  for ($i=0;$i<count($liste);$i++)
		{
		$reference=$liste[$i][0];
		$quantite=$liste[$i][1];
		$prixArticle=$liste[$i][3];
		$insertListe = "INSERT INTO listes (commandeID, reference, quantite, prixArticle) VALUES ('$commandeID', '$reference', '$quantite', '$prixArticle')";
		$Result2 = mysql_query($insertListe, $ConnexionBoutiquemx) or die(mysql_error()); 
		}
	unset($_SESSION['liste']);
	unset($_SESSION['total']);
	unset($_SESSION['action']);
 
	}
$colname_rsSelectCommande = "1";
if (isset($_SESSION['clientID'])) {
  $colname_rsSelectCommande = (get_magic_quotes_gpc()) ? $_SESSION['clientID'] : addslashes($_SESSION['clientID']);
}
mysql_select_db($database_ConnexionBoutiquemx, $ConnexionBoutiquemx);
$query_rsSelectCommande = sprintf("SELECT ID, `date` FROM commandes WHERE clientID = %s ORDER BY ID DESC", $colname_rsSelectCommande);
$rsSelectCommande = mysql_query($query_rsSelectCommande, $ConnexionBoutiquemx) or die(mysql_error());
$row_rsSelectCommande = mysql_fetch_assoc($rsSelectCommande);
$totalRows_rsSelectCommande = mysql_num_rows($rsSelectCommande);
 
$colname_rsListe = "1";
if (isset($_GET['commandeID'])) {
  $colname_rsListe = (get_magic_quotes_gpc()) ? $_GET['commandeID'] : addslashes($_GET['commandeID']);
}
mysql_select_db($database_ConnexionBoutiquemx, $ConnexionBoutiquemx);
$query_rsListe = sprintf("SELECT reference, quantite, prixArticle FROM listes WHERE commandeID = %s ORDER BY reference ASC", $colname_rsListe);
$rsListe = mysql_query($query_rsListe, $ConnexionBoutiquemx) or die(mysql_error());
$row_rsListe = mysql_fetch_assoc($rsListe);
$totalRows_rsListe = mysql_num_rows($rsListe);
 
$colname_rsCommande = "0";
if (isset($_GET['commandeID'])) {
  $colname_rsCommande = (get_magic_quotes_gpc()) ? $_GET['commandeID'] : addslashes($_GET['commandeID']);
}
mysql_select_db($database_ConnexionBoutiquemx, $ConnexionBoutiquemx);
$query_rsCommande = sprintf("SELECT commandes.`date`, commandes.etat, commandes.total, clients.nom, clients.prenom, clients.adresse, clients.ville, clients.cp, clients.tel, commandes.ID FROM commandes, clients WHERE commandes.ID=%s AND commandes.clientID=clients.ID", $colname_rsCommande);
$rsCommande = mysql_query($query_rsCommande, $ConnexionBoutiquemx) or die(mysql_error());
$row_rsCommande = mysql_fetch_assoc($rsCommande);
$totalRows_rsCommande = mysql_num_rows($rsCommande);
?>
<html><!-- InstanceBegin template="../../SITEboutiquemx/Templates/ModelePublic.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Boutique MX by phpmx.com</title>
<!-- InstanceEndEditable --> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body>
<div align="center">
  <p><img src="../images/bandeauPublic.gif" width="650" height="100" border="0" usemap="#Map"> 
  </p>
 
    <map name="Map">
      <area shape="rect" coords="24,63,168,91" href="catalogue.php">
      <area shape="rect" coords="199,64,302,91" href="panier.php">
      <area shape="rect" coords="338,65,491,91" href="commande.php">
      <area shape="rect" coords="528,63,625,93" href="../administrateur/index.php">
      <area shape="rect" coords="217,8,436,42" href="http://www.phpmx.com">
  </map>
 
</div> 
<!-- InstanceBeginEditable name="pagePublic" --> 
<table width="100%" border="0" cellspacing="0">
  <tr> 
    <td><p align="center"><strong><font color="#FF0000" size="6" face="Arial, Helvetica, sans-serif">COMMANDE</font></strong></p>
      <?php if ($totalRows_rsSelectCommande > 0) {  ?>
      <form name="form1" method="get" action="commande.php">
        <table width="500" border="1" align="center" cellspacing="0">
          <tr>
            <td width="236">S&eacute;lectionnez la commande &agrave; afficher : </td>
            <td width="254">
              <select name="commandeID" id="commandeID">
                <?php
do {  
?>
                <option value="<?php echo $row_rsSelectCommande['ID']?>"<?php if (!(strcmp($row_rsSelectCommande['ID'], $_GET['commandeID']))) {echo "SELECTED";} ?>>N°<?php echo $row_rsSelectCommande['ID']?> du <?php echo $row_rsSelectCommande['date']?></option>
                <?php
} while ($row_rsSelectCommande = mysql_fetch_assoc($rsSelectCommande));
  $rows = mysql_num_rows($rsSelectCommande);
  if($rows > 0) {
      mysql_data_seek($rsSelectCommande, 0);
	  $row_rsSelectCommande = mysql_fetch_assoc($rsSelectCommande);
  }
?>
              </select>
              <input type="submit" name="Submit" value="AFFICHER"></td>
          </tr>
        </table>
      </form>
      <?php }  ?>
      <?php if ($totalRows_rsListe > 0) {  ?>
      <table width="650" border="1" align="center" cellspacing="0" bordercolor="#FF0000">
        <tr>
          <td>
            <div align="center">
              <table width="644" border="0" cellspacing="0">
                <tr bgcolor="#FF0000">
                  <td width="217">
                    <div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">R&eacute;f&eacute;rence</font></strong></font></div></td>
                  <td width="258">
                    <div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Quantit&eacute;</font></strong></font></div></td>
                  <td width="163">
                    <div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Prix</font></strong></font></div></td>
                </tr>
                <?php do { ?>
                <tr>
                  <td><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsListe['reference']; ?></font></div></td>
                  <td><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsListe['quantite']; ?></font></div></td>
                  <td><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsListe['prixArticle']; ?></font></div></td>
                </tr>
                <?php } while ($row_rsListe = mysql_fetch_assoc($rsListe)); ?>
                <tr>
                  <td colspan="3"><!-- #BeginLibraryItem "/Library/barreRouge.lbi" -->
                    <hr align="center" size="2" noshade color="#FF0000">
                  <!-- #EndLibraryItem --></td>
                </tr>
                <tr>
                  <td colspan="2"><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Total &agrave; payer :</font></div></td>
                  <td>
                    <div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b><?php echo $row_rsCommande['total']; ?></b></font></div></td>
                </tr>
              </table>
          </div></td>
        </tr>
      </table>
      <br>
      <div align="center">
        <table width="650" border="1" align="center" cellspacing="0" bordercolor="#FF0000">
          <tr>
            <td><table width="650" border="0" cellspacing="0">
                <tr>
                  <td colspan="2"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Commande N&deg;<?php echo $row_rsCommande['ID']; ?><strong></strong> du<strong> </strong> <?php echo $row_rsCommande['date']; ?> - Etat : <strong><?php echo $row_rsCommande['etat']; ?></strong></font></div></td>
                </tr>
                <tr>
                  <td colspan="2"><div align="center"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font><!-- #BeginLibraryItem "/Library/barreRouge.lbi" -->
                      <hr align="center" size="2" noshade color="#FF0000">
                      <!-- #EndLibraryItem --><font size="2" face="Verdana, Arial, Helvetica, sans-serif">ADRESSE DE LIVRAISON ET DE FACTURATION : <br>
                      </font> <!-- #BeginLibraryItem "/Library/barreRouge.lbi" -->
                      <hr align="center" size="2" noshade color="#FF0000">
                  <!-- #EndLibraryItem --><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font> </div></td>
                </tr>
                <tr>
                  <td width="277"><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Nom :</font></div></td>
                  <td width="369"><?php echo $row_rsCommande['nom']; ?></td>
                </tr>
                <tr>
                  <td><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Pr&eacute;nom :</font></div></td>
                  <td><?php echo $row_rsCommande['prenom']; ?></td>
                </tr>
                <tr>
                  <td><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">T&eacute;l :</font> </div></td>
                  <td><?php echo $row_rsCommande['tel']; ?></td>
                </tr>
                <tr>
                  <td><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Adresse :</font></div></td>
                  <td><?php echo $row_rsCommande['adresse']; ?></td>
                </tr>
                <tr>
                  <td><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Ville : </font></div></td>
                  <td><?php echo $row_rsCommande['ville']; ?></td>
                </tr>
                <tr>
                  <td><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Cp : </font></div></td>
                  <td><?php echo $row_rsCommande['cp']; ?></td>
                </tr>
            </table></td>
          </tr>
        </table>
      </div>
      <?php } ?>
      <?php if ($totalRows_rsSelectCommande == 0) {  ?>
      <table width="100%" border="0" cellspacing="0">
        <tr>
          <td><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><br>
        Vous n'avez pas encore de commande d'enregistr&eacute;e.<br>
        Cliquez sur la rubrique Catalogue pour s&eacute;lectionner vos articles.<br>
        <br>
          </font></div></td>
        </tr>
            </table>
      <?php }  ?>
      <p align="center">&nbsp;</p></td>
  </tr>
</table>
<!-- InstanceEndEditable -->
<p align="center"><img src="../images/BarreBasPublic.gif" border="0" usemap="#Map2">
  <map name="Map2">
    <area shape="rect" coords="112,2,212,18" href="http://www.phpmx.com">
  </map>
</p>
</div>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($rsSelectCommande);
 
mysql_free_result($rsListe);
 
mysql_free_result($rsCommande);
 
mysql_free_result($rsRappelClient);
?>
et voisi le code page panier
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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
session_start();
if (!isset($_SESSION['total'])) $_SESSION['total']=0;
if(!isset($_GET['ajoutPanier'])) $ajoutPanier="";
else  $ajoutPanier=$_GET['ajoutPanier']; 
if(!isset($_GET['modifPanier'])) $modifPanier="";
else $modifPanier=$_GET['modifPanier'];
if(!isset($_GET['suppPanier'])) $suppPanier="";
else $suppPanier=$_GET['suppPanier'];
if(!isset($_GET['enregistreCommande'])) $enregistreCommande="";
else $enregistreCommande=$_GET['enregistreCommande'];
if ((!isset($_SESSION['liste']))&&($ajoutPanier=="")) $liste[]=array("VIDE",1,0,0);
if (isset($_SESSION['liste'])) $liste=$_SESSION['liste'];
?>
<?php require_once('../Connections/ConnexionBoutiquemx.php'); ?>
<?php 
mysql_select_db($database_ConnexionBoutiquemx, $ConnexionBoutiquemx);
if ($ajoutPanier=="AJOUTER")
{
	$reference=$_GET['reference'];
	$nb=1; 
	$prix=$_GET['prix'];
	$liste[]=array($reference,$nb,$prix,$prix);
	$_SESSION['liste']=$liste;
}
if ($modifPanier=="ACTUALISER")
{
	 for ($i=0;$i<count($liste);$i++)
		{
		$nbi='nb'.$i;
		$liste[$i][1]=$_GET["$nbi"];
		$liste[$i][3]=$liste[$i][1]*$liste[$i][2];
		}
	$_SESSION['liste']=$liste;
}
if ($suppPanier=="SUPPRIMER")
{
	$article=$_GET['article'];
	for ($i=0;$i<count($liste);$i++)
		{
		if($article==$liste[$i][0])
			array_splice($liste,$i,1);
		}
	$_SESSION['liste']=$liste;
}
if ($enregistreCommande=="COMMANDER")
{
	if(!isset($_GET['action'])) 
	$_SESSION['action']="ENREGISTRER";
	header("Location: commande.php");
}
 ?>
 <html>
<head>
<title>Boutique MX by phpmx.com</title>
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 
</head>
<body>
<div align="center">
  <p><img src="../images/bandeauPublic.gif" width="650" height="100" border="0" usemap="#Map"> 
  </p>
 
    <map name="Map">
      <area shape="rect" coords="22,65,166,93" href="../public/catalogue.php">
      <area shape="rect" coords="190,67,293,94" href="../public/panier.php">
      <area shape="rect" coords="325,68,478,94" href="../public/commande.php">
      <area shape="rect" coords="524,66,621,96" href="../administrateur/index.php">
    </map>
 
</div> 
 
 
<table width="100%" border="0" cellspacing="0">
  <tr> 
    <td><p align="center"><strong><font color="#FF0000" size="6" face="Arial, Helvetica, sans-serif">PANIER</font></strong></p>
 
	 <?php if($liste[0][0]!="VIDE") { ?>	  <form action="../public/panier.php" method="get" >
  <table width="650" border="1" align="center" cellspacing="0" bordercolor="#FF0000">
    <tr> 
      <td><table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr bgcolor="#FF0000"> 
            <td width="200"> <div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Titre</font></strong></font></div></td>
            <td width="200"> <div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Quantit&eacute;</font></strong></font></div></td>
            <td width="200"> <div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Prix</font></strong></font></div></td>
            <td width="50"> <div align="center"><font color="#FFFFFF"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Supp</font></strong></font></div></td>
          </tr>
          <?php
		   $total=0.00;
  for ($i=0;$i<count($liste);$i++)
{
	$query_rsPanier="select * from articles where reference = '".$liste[$i][0]."'";
	$rsPanier = mysql_query($query_rsPanier, $ConnexionBoutiquemx) or die(mysql_error());
    $row_rsPanier = mysql_fetch_assoc($rsPanier);		
	?>
          <tr> 
            <td><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsPanier['titre'] ?></font></div></td>
            <td><div align="center"> 
                <select name="nb<?php echo $i ?>" id="nb">
                  <option value="1"  <?php if($liste[$i][1]==1) echo "SELECTED"; ?>>1</option>
                  <option value="2" <?php if($liste[$i][1]==2) echo "SELECTED"; ?>>2</option>
                  <option value="3" <?php if($liste[$i][1]==3) echo "SELECTED"; ?>>3</option>
                </select>
              </div></td>
            <td><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $row_rsPanier['prix'] ?></font></div></td>
            <td><div align="center"><a href="panier.php?suppPanier=SUPPRIMER&article=<?php echo $row_rsPanier['reference'] ?>"><img src="../images/Next.gif" width="14" height="13" border="0"></a></div></td>
          </tr>
          <?php
 
	$total+=$row_rsPanier['prix'] * $liste[$i][1];
}
$_SESSION['total']=$total;
 
?>
          <tr> 
            <td ><div align="center"></div></td>
            <td ><div align="center"></div></td>
            <td ><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Total 
                : <?php echo $total ?> Euros</strong></font></div></td>
            <td ><div align="center"></div></td>
          </tr>
        </table></td>
    </tr>
  </table>
  <br>
  <p align="center"> 
    <input type="submit" name="modifPanier" value="ACTUALISER">
    <input name="enregistreCommande" type="Submit" value="COMMANDER">
  </p>
</form> 
 <?php } else { ?>
      <p align="center"><strong><font size="4" face="Verdana, Arial, Helvetica, sans-serif">Votre panier est vide</font></strong></p>
 
	 <?php }?>	  </td>
  </tr>
</table>
<p align="center"><img src="../images/BarreBasPublic.gif"></p>
</div>
</body>
</html>
cobaya est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 19h58.


 
 
 
 
Partenaires

Hébergement Web