I'm a newbie so my question is maybe a little bit strange. I'm trying to use prepared statements for the following code:
<?php
require_once(__DIR__.'/config.php');
$value = $_POST["value"];
$ort = $_GET["ort"];
$stmt = $pdo->prepare('SELECT * FROM Suchmaschine WHERE firma = :firma AND ort = :ort');
$stmt->execute(array('firma' => $value, 'ort' => $value));
foreach ($stmt as $row) {
echo "<a href=".$row['link'].">".$row['firma']."</a><br>";
}
?>
I tried some ways, but it doesn't work.