Image is displaying all the fields with data coming from database but in the image field it is saying no file chosen.I am trying to fetch the rows that has specific columns such as title ,slug and image. But i am getting failed to fetch the image for a specific id. All fields are getting the data from database. But image is getting failed. The current code is following:-
enter code here
if (isset($_GET['piD'])) {
$piD = $_GET['piD'];
$fetch = $conn->prepare("SELECT * FROM posts WHERE id=?");
$fetch->execute(array($piD));
if ($fetch->rowCount()>0) {
$postRow = $fetch->fetch();
$title = $postRow['title'];
$email = $postRow['email'];
$slug = $postRow['slug'];
$body = $postRow['body'];
$image =$postRow['image'];
}
else
{
header('location:posts.php?no post found');
}