Advertisement
Guest User

Untitled

a guest
May 24th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. <?php
  2. $sql = "SELECT * from Commandes where nom_expo like '".$_SESSION['login_user']."'";
  3. $result = mysqli_query($db,$sql);
  4. $row = mysqli_fetch_array($result,MYSQLI_ASSOC);
  5.  
  6. echo '<div class="item">';
  7.  
  8. if($row['typ_caf'] == 1) {
  9. echo "<h4>Type de café : Arabica</h4>";
  10. } else {
  11. echo "<h4>Type de café : Robusta</h4>";
  12. }
  13. $asql = "SELECT lib_pay from Pays where id_pay = ".$row['id_pay'];
  14. $aresult = mysqli_query($db,$asql);
  15. $arow = mysqli_fetch_array($aresult,MYSQLI_ASSOC);
  16. echo '<h4> Pays : '.$arow['lib_pay'];
  17. echo '<h4> Quantité commandé: '.$row['qte_com'] ."</h4>";
  18. echo '<h4> Nom de l\'utilisateur: '.$row['nom_expo'] ."</h4>";
  19. echo '<h4> Date de commande: '.$row['dat_com'] ."</h4>";
  20. echo '<h4> Numéro de commande: '.$row['num_com'] ."</h4>";
  21. echo '<button type="button" class="btn btn-warning">Modifier</button>';
  22. echo '<button type="button" class="btn btn-danger">Annuler</button>';
  23. echo '</div>';
  24. echo '<br>';
  25.  
  26.  
  27.  
  28.  
  29. while (($row = $result->fetch_assoc()) !== null) {
  30. echo '<div class="item">';
  31.  
  32. if($row['typ_caf'] == 1) {
  33. echo "<h4>Type de café : Arabica</h4>";
  34. } else {
  35. echo "<h4>Type de café : Robusta</h4>";
  36. }
  37. $asql = "SELECT lib_pay from Pays where id_pay = ".$row['id_pay'];
  38. $aresult = mysqli_query($db,$asql);
  39. $arow = mysqli_fetch_array($aresult,MYSQLI_ASSOC);
  40. echo '<h4> Pays : '.$arow['lib_pay'];
  41. echo '<h4> Quantité commandé: '.$row['qte_com'] ."</h4>";
  42. echo '<h4> Nom de l\'utilisateur: '.$row['nom_expo'] ."</h4>";
  43. echo '<h4> Date de commande: '.$row['dat_com'] ."</h4>";
  44. echo '<h4> Numéro de commande: '.$row['num_com'] ."</h4>";
  45. echo '<button type="button" class="btn btn-warning">Modifier</button>';
  46. echo '<button type="button" class="btn btn-danger">Annuler</button>';
  47. echo '</div>';
  48. echo '<br>';
  49. }
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement