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
| ?php
include 'entete.php';
$bienvenue= $_SESSION["login"];
?>
<div class="home-content">
<div class="overview-boxes">
<div class="box2"><form action="recherche.php" method="POST">
<label for="categorie_produit">Catégorie</label>
<select name="categorie_produit" id="categorie_produit">
<option <?= !empty($_GET['id']) && $article['categorie_produit']=="Ordinateur" ? "selected": ""?>value="Ordinateur">Ordinateur</option>
<option <?= !empty($_GET['id']) && $article['categorie_produit']=="Imprimante" ? "selected": ""?>value="Imprimante">Imprimante</option>
<option <?= !empty($_GET['id']) && $article['categorie_produit']=="Accessoire" ? "selected": ""?>value="Accessoire">Accessoire</option>
</select>
<table class="mtable">
<tr>
<th>Catégorie</th>
<th>Ref article</th>
<th>Nom article</th>
<th>Stock actuel</th>
</tr>
<?php
$stock_now = getstock();
if (!empty($stock_now) && is_array($stock_now)) {
foreach ($stock_now as $key => $value) {
?>
<tr>
<td><?= $value['categorie_produit'] ?></td>
<td><?= $value['ref_produit'] ?></td>
<td><?= $value['nom_produit'] ?></td>
<td><?= $value['stock_actuel'] ?></td>
</tr>
<?php
}
}
?>
</table>
</div>
</div>
</div>
</section> |
Partager