I know this question has been asked many times but I couldnot solve this using any of them. I am new to sqlite and cannot understand what I am doing wrong.
Create an image.php:
<?php
$sql = "SELECT user_profile_picture FROM profile WHERE id = " . $_GET['id'];
$query = $db->query($sql);
$row = $query->fetchArray(SQLITE3_ASSOC);
header('Content-Type: image/png');
echo $row['user_profile_picture'];
In profile.php:
<img src='image.php?id=<?php echo $row['id'];?>'/>