I am trying to gather some variables from my query then output them using $stmt->bind_result()
however I am not getting any rows returned in my search.
I am not sure what is going wrong here?
$tag = trim($_GET['tag']);
$stmt = $mysqli->prepare('SELECT trips.trip_id FROM trips JOIN tags ON trips.post_id = tags.post_id WHERE tag = ?');
$stmt->bind_param('s', $tag);
$stmt->execute();
$stmt->bind_result($id);
while ($stmt->fetch()) {
echo $id;
}