Can someone explain why this isnt working? I think this part is wrong, but I don't know how to fix it.
$stmt = $pdo->prepare("SELECT * FROM locatie WHERE gebouw LIKE '%?%'
AND ruimte LIKE '%?%'");
$stmt->execute(array($gebouw_zoeken, $ruimte_zoeken));
The problem is it isnt showing the result of the query. There arent any error codes either.
<table>
<form action="index.php" method="post">
Locatie zoeken:<br>
<input placeholder="Gebouwnaam" type="text" name="gebouw_zoeken"
>
<br>
<input placeholder="Ruimtenaam" type="text" name="ruimte_zoeken"
>
<br><br>
<input type="submit" name="submit_zoeken" value="Locatie
zoeken" ><br>
</form>
</table><br><br>
<?php
if (isset($_POST["submit_zoeken"])) {
$gebouw_zoeken = $_POST["gebouw_zoeken"];
$ruimte_zoeken = $_POST["ruimte_zoeken"];
$stmt = $pdo->prepare("SELECT * FROM locatie WHERE gebouw LIKE '%?%'
AND ruimte LIKE '%?%'");
$stmt->execute(array($gebouw_zoeken, $ruimte_zoeken));
?>