Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

I am trying to fetch the rows in my input fields using rowCount but image is getting failed

$
0
0

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');
}

Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>