Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $sql = "SELECT * from Commandes where nom_expo like '".$_SESSION['login_user']."'";
- $result = mysqli_query($db,$sql);
- $row = mysqli_fetch_array($result,MYSQLI_ASSOC);
- echo '<div class="item">';
- if($row['typ_caf'] == 1) {
- echo "<h4>Type de café : Arabica</h4>";
- } else {
- echo "<h4>Type de café : Robusta</h4>";
- }
- $asql = "SELECT lib_pay from Pays where id_pay = ".$row['id_pay'];
- $aresult = mysqli_query($db,$asql);
- $arow = mysqli_fetch_array($aresult,MYSQLI_ASSOC);
- echo '<h4> Pays : '.$arow['lib_pay'];
- echo '<h4> Quantité commandé: '.$row['qte_com'] ."</h4>";
- echo '<h4> Nom de l\'utilisateur: '.$row['nom_expo'] ."</h4>";
- echo '<h4> Date de commande: '.$row['dat_com'] ."</h4>";
- echo '<h4> Numéro de commande: '.$row['num_com'] ."</h4>";
- echo '<button type="button" class="btn btn-warning">Modifier</button>';
- echo '<button type="button" class="btn btn-danger">Annuler</button>';
- echo '</div>';
- echo '<br>';
- while (($row = $result->fetch_assoc()) !== null) {
- echo '<div class="item">';
- if($row['typ_caf'] == 1) {
- echo "<h4>Type de café : Arabica</h4>";
- } else {
- echo "<h4>Type de café : Robusta</h4>";
- }
- $asql = "SELECT lib_pay from Pays where id_pay = ".$row['id_pay'];
- $aresult = mysqli_query($db,$asql);
- $arow = mysqli_fetch_array($aresult,MYSQLI_ASSOC);
- echo '<h4> Pays : '.$arow['lib_pay'];
- echo '<h4> Quantité commandé: '.$row['qte_com'] ."</h4>";
- echo '<h4> Nom de l\'utilisateur: '.$row['nom_expo'] ."</h4>";
- echo '<h4> Date de commande: '.$row['dat_com'] ."</h4>";
- echo '<h4> Numéro de commande: '.$row['num_com'] ."</h4>";
- echo '<button type="button" class="btn btn-warning">Modifier</button>';
- echo '<button type="button" class="btn btn-danger">Annuler</button>';
- echo '</div>';
- echo '<br>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement