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
|
<form method="GET" action="rec-panier.php">
<center><p style='font-size:15px; font-weight:bold'>Mon panier</p></center>
*
*
<table id="demo" class="filterable" cellpadding="0" cellspacing="0" width="80%" align="center">
******* <tbody>
*************** <tr align="left">
*********************** <th align="center" width="5%">Nom Recette</th>
*********************** <th align="center" width="5%">Type</th>
*********************** <th align="center" width="5%">Catégorie</th>
*********************** <th align="center" width="5%">Vous l'avez testé ?</th>
*********************** <th align="center" width="5%">Commentaire</th>
*********************** <th align="center" width="5%">Supprimer</th>
***********************
*************** </tr>
*
<?PHP
*
$id = $_SESSION["membre_id"];
*
$req = "SELECT * FROM recette, espace_utilisateur, categorie WHERE espace_utilisateur.id = '$id'
*********************** And espace_utilisateur.IdRecette = recette.IdRecette AND categorie.Id= recette.Categorie";
*******
$result = mysql_query($req) or die('Erreur SQL !<br>'.$req.'<br>'.mysql_error());
*******
$count = mysql_query("SELECT COUNT(recette.Nom) As nbr FROM recette, espace_utilisateur WHERE espace_utilisateur.id = '$id'
*********************************************** And espace_utilisateur.IdRecette = recette.IdRecette");
$nbRecette = mysql_fetch_assoc($count);
$nbr = $nbRecette['nbr'];
*
$i=0;
***************
*************** if ($nbr <= 0)
*************** echo "<tr><td>Votre panier est vide </ td></tr>";
*************** else
*************** {
*************** while ($var = mysql_fetch_array($result)){
***************
*********************** $recette[$i] = $var['Nom'];
*********************** $nomtype[$i] = $var['Type'];
*********************** $nomcat[$i] = $var['Categorie'];
*********************** $test[$i] = $var['Test'];
*********************** $commentaire[$i] = $var['Commentaire'];
*********************** $i++;
***********************
*********************** }
***************
*************** for ($i=0 ;$i < $nbr ; $i++)
*********************** {
***************
***************
*************** ?>
***************
*******
******************************* <td align="center">
*********************************************** <?php echo $recette[$i];?>
*************************************** </td>
***************************************
*******
*************************************** <td align="center">
*********************************************** <?php echo $nomtype[$i];?>
*************************************** </td>
*************************************** <td align="center"><?php
*********************************************** if ($nomcat[$i] == NULL)
*********************************************** {
******************************************************* echo "NA";
*********************************************** }
*********************************************** echo $nomcat[$i];?>
*************************************** </td>
***************************************************************************************
***************************************
*************************************** <td align="center">
*************************************** <?php
*************************************** echo* "<form action='' method='POST'>
*******************************************************
*************************************************************** <select name='Test'>";
***********************
***********************
*********************************************** echo"<option>$test[$i]</option>";?><br>
*********************************************** <?php
***********************************************
*********************************************** if ($test[$i] == "NON"){
*********************************************** echo"<option>OUI</option>";}
*********************************************** ELSE IF ($test[$i] = "OUI")
*********************************************** {
*********************************************** echo"<option>NON</option>";
*********************************************** }
***********************************************
*********************************************** ?>
*******************************************************************************
*************************************** </td>**********
*************************************** <td align="center">
*************************************** <textarea name="commentaire" rows="3" cols="30" size="20" value="
*************************************** <?php
*************************************** echo $commentaire[$i];
***************************************
*************************************** ?>">
*************************************** </textarea>
*************************************** </td>
***************************************
*************************************** <td align="center">
*************************************** <input type="checkbox" name="supprimer" value="supprimer">
*************************************** </td>
***************************************
***************************************
******************************* </tr>
*************** <?php
***************
*********************** }
***********************
******************************************************************************************************* }
***********************
*********************** ?>
***************
</tbody></div>
</table>
<BR><BR>
<center><input type="submit" value="Mise à jour"></center>
* |
Partager