Programmation PHP

Fermé
anass - 3 juin 2007 à 15:36
sfinxrecord Messages postés 12 Date d'inscription dimanche 3 juin 2007 Statut Membre Dernière intervention 1 février 2009 - 3 juin 2007 à 18:04
j'ai besoin d'aide en récupérations des informations grace aux checkbox en PHP bien sur
A voir également:

2 réponses

salut moi j'ai à peu près la même difficulté sauf que moi je suis un débutant. Donc mon problème est le suivant:
j'ai un tableau où il existe une colonne des checkbox à selectionner :

<table width="708" border="0" cellspacing="2">bgcolor="#B9E9FF">
<td width="71">
<th width="119" class="Style12" scope="col"> Nom du Produit </th>
<th width="348" class="Style12" scope="col">Description</th>
<th width="56" class="Style12" scope="col">Prix</th>
<th width="81" class="Style12" scope="col">Commander</th>
</tr>
<tr bgcolor="#ECF9FF">
<td><img src="image/rapatch.bmp" alt="repatch" width="63" /></td>
<td class="Style13">Radical Patch</td>
<td>Soin du contour des yeux et des lèvres aux vitamines A, C et E et extraits de papaye<br />
6 soins de nuit - 6 x 2 patchs</td>
<td>14.90€</td>
<td><form id="form1" name="form1" method="post" action="afirmcom">
<label></label>
<input type="checkbox" name="bt1" value="com1" >
</form> </td>
</tr>
<tr bgcolor="#ECF9FF">
<td><img src="image/frownies.bmp" alt="frownies" width="65" /></td>
<td class="Style15"><strong>Frownies</strong><br /> </td>
<td>Dermopapier adhésif contre les rides frontales<br />
boite de 92</td>
<td>19.90€</td>
<td><input type="checkbox" name="bt12" value="com1" /></td>
</tr>
<tr bgcolor="#ECF9FF">
<td><img src="image/lierac.bmp" alt="lierac" width="65" /></td>
<td class="Style15"><strong>Lierac Exclusive</strong></td>
<td>Solupatch comblement des rides flash 8 jours<br />
8x5 patchs et 1 flacon de 7.5 ml</td>
<td>149.00€ </td>
<td><input type="checkbox" name="bt4" value="com3" ></td>
</tr>
<tr bgcolor="#ECF9FF">
<td><img src="image/coupd'eclat.bmp" alt="coupd'eclat" width="65" /></td>
<td class="Style15"><strong>Coup d’Eclat</strong></td>
<td>Ampoule nature visage<br />
Effet liftingr phytotenseur immédiat, raffermit et régrénère l’épiderme. Soluté de 12 ampoules d’1 ml
</td>
<td>
23.50€
</td>
<td><input type="checkbox" name="bt5" value="com4" ></td>
</tr>
<tr bgcolor="#ECF9FF">
<td><img src="image/covermark.bmp" alt="covermark" width="65" /></td>
<td class="Style15"><strong>Covermark Face magic</strong></td>
<td>Maquillage correcteur dermocosmétique cache-tache pour le visage. tube de 30 ml</td>
<td>26.90€</td>
<td><input type="checkbox" name="bt6" value="com5" ></td>
</tr>
<tr bgcolor="#ECF9FF">
<td><img src="image/crealine.bmp" alt="crealine" width="65" /></td>
<td class="Style15"><strong>Crealine TS teintée</strong><br /> </td>
<td>Soin antirougeur teinté, apaisant, hydratant et nutritif intense. tube de 40 ml</td>
<td>15.50€</td>
<td><input type="checkbox" name="bt7" value="com6" ></td>
</tr>
<tr bgcolor="#ECF9FF">
<td><img src="image/talika.bmp" alt="talika" width="65" /></td>
<td class="Style15"><strong>Lipo Cils EyeBrow Talika</strong></td>
<td>Gel liposomé aux extraits végétaux pour les sourcils<br />
flacon de 7 ml</td>
<td>34.50€</td>
<td><input type="checkbox" name="bt8" value="com7" ></td>
</tr>
<tr bgcolor="#ECF9FF">
<td><img src="image/cils.bmp" alt="cils" width="65" /></td>
<td class="Style15"><strong>Talika Extenseur-Cils</strong></td>
<td>L’effet faux cils instantané<br />
flacon de 1 gr</td>
<td>24.50€</td>
<td><input type="checkbox" name="bt9" value="com7" ></td>
</tr>
<tr bgcolor="#ECF9FF">
<td><img src="image/darphin.bmp" alt="darphin" width="65" /></td>
<td class="Style15"><strong>Darphin</strong></td>
<td>Arovita gel contour des yeux et des lèvres<br />
pot de 30 ml</td>
<td>43.90€</td>
<td><input type="checkbox" name="bt10" value="com7"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td><form id="form2" name="form2" method="post" action="afirmcom.php">
<label for="Submit"></label>
<input name="Submit" type="submit" class="Style12" id="Submit" value="Commander" />



c'est très long je sais mais excusez moi je connais pas beaucoup en PHP et j'ai des problèmes. Ce que je veux c'est que je veux récupérer de la BD les inormations des checkbox sélectionnés pour pouvoir terminer la 2éme page qui se présente comme suit:
<table width="624" border="0" cellspacing="4">
<tr>
<th width="94" height="30" scope="row">Nom</th>
<td width="12"> </td>
<td width="478"><form id="form1" name="form1" method="post" action="">
<label for="textfield"></label>
<input type="text" name="nom" id="nom" />
<label for="radiobutton"></label>
</form> </td>
</tr>
<tr>
<th scope="row">Prenom</th>
<td> </td>
<td><input type="text" name="prenom" id="prenom" /></td>
</tr>
<tr>
<th scope="row">Adresse</th>
<td> </td>
<td><input name="adresse" type="text" id="adresse" size="80" /></td>
</tr>
<tr>
<th scope="row">E-mail</th>
<td> </td>
<td><p>
<input type="text" name="email" id="email" />
</p> </td>
</tr>
<tr>
<th scope="row">Telephone</th>
<td> </td>
<td><input type="text" name="tel" id="tel" /></td>
</tr>
<tr>
<th scope="row">Produits sélectionnés </th>
<td> </td>
<td><input type="text" name="pselect" id="ps" /></td>
</tr>
<tr>
<th scope="row">Total à payer </th>
<td> </td>
<td><input type="text" name="ttc" id="ttc" /></td>
</tr>
<tr>
<th scope="row">N° Card Credit </th>
<td> </td>
<td><input type="text" name="cc" id="cc" /></td>
</tr>
</table>


ce que je veux exactement c'est que je veux récupérer les différents produits qui sont cochés dans les checkbox dans la page précédente aisin que le total à payer de tous les produits sélectionnés!!!!

Merci de votre aide
0
sfinxrecord Messages postés 12 Date d'inscription dimanche 3 juin 2007 Statut Membre Dernière intervention 1 février 2009 23
3 juin 2007 à 18:04
0