l102/website/zoek.php
<?php
include("db.php");
include("functies.php");
$zoek = $_GET["zoeken"];
$query = "SELECT *
FROM spelers WHERE spelerVoornaam like '%$zoek%'";
$result = mysqli_query($db, $query);
echo '<div><h2>Product</h2></div>';
while ($row = mysqli_fetch_array($result)) {
echo"<div>";
echo "<a class='productButton' href='jumboProducten.php?productDetails=$row[0]'>$row[1], €$row[3] </a>";
if($admin == true) {
echo "|| <a class='wijzigInfoButton' href='jumboProducten.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