123456/V5 PO PHP/Okke en Ot/zoeken.php
<?php
//doet hetzelfde als assortimentdetails
include("db.php");
include("functies.php");
$zoek = $_GET["zoeken"];
$query = "SELECT *
FROM producten p, verkopen v
WHERE winkelID = 1 AND p.product_naam like '%$zoek%' AND v.productID = p.productID";
$result = mysqli_query($db, $query);
echo '<div><h2>Product</h2></div>';
while ($row = mysqli_fetch_array($result)) {
echo"<div>";
echo "<a class='productButton' href='assortiment.php?assortimentDetails=$row[0]'>$row[1], €$row[3] </a>";
if($admin == true) {
echo "|| <a class='wijzigInfoButton' href='assortiment.php?edit=$row[0]'>wijzig informatie</a> <br>";
}
echo "<br><img class='productFoto' src='images/$row[0].png' alt='productfoto'><br>";
echo"</div>";
}
Resultaat
Made by Thijs Aarnoudse