I want to fetch data from the database by using a prepared statement but it failed and not even showing any error. I used this but still not working $result15->close();
Help me to write this code.
<?php
$prep_stmt = "SELECT id FROM detail WHERE id = ? LIMIT 10";
$result15 = $mysqli->prepare($prep_stmt);
$result15->bind_param("i",$id);
$result15->execute();
$row151=$result15->get_result();
?>
<?php
while($res15 = $row151->fetch_assoc()){
?>
<tr>
<td><a href="post?id=<?php echo base64_encode(urlencode($res15->id))?>&<?php echo $res15->addpage;?>" target="_blank"><?php echo $res15->post_name;?></a></td>
</tr>
<?php
}
$result15->close();
?>