Here, i'm trying to fetch the image from database. In my database i can see a image file size ([BLOB - 62.3 KiB]). But, it didn't work. i didn't get any error here. i'm confused where i made a mistake here?
<?php
include('config.php');
ini_set('display_errors', '1');
error_reporting(E_ALL);
try
{
$stmt = $conn->prepare('SELECT * FROM ebusers');
$conn->errorInfo();
$stmt->execute();
while($row = $stmt->fetch(PDO::FETCH_ASSOC))
{
echo '<img class=shadow_img width=160 height=180 src="data:image/png;base64,' . base64_encode($row['UserProfilePicture']) . '"/>';
echo $row['Address'];
echo "<br>";echo "<br>";echo "<br>";echo "<br>";
}
}
catch(PDOException $e)
{
'Error : '.$e->getMesssage();
}
?>