I am having trouble displaying an image in my mysql database uploaded as a blob.
I have tried echoing the image. All other categories are displayed except the image.
$query = $handler->query('SELECT * FROM articles');
$results = $query->fetchAll(PDO::FETCH_ASSOC);
for ($i=0; $i < count($results); $i++) {
echo '<div class="col-md-4 col-xs-12 col-sm-12 height-news">';
echo '<p class="news-title">'.$results[$i]['headline'].'<br>'.'</p>';
echo '<img class="news-img" '.'src="'.$results[$i]['logo'].'">'.'</img>'.'<br>';
echo '<p class="news-time">'.$results[$i]['date'].'<br>'.'</p>';
echo '<p class="news-body">'.$results[$i]['text'].'<br>'.'</p>'.'</div>';
}
?>
Using this code I get this error:
Notice: Undefined variable: result in C:\xampp\htdocs\deeplake6\news.php on line 129