Im trying to display alla images in a <img>
from the db but i am only getting a broken image!
I am storing the ['tmp_name'] as LONGBLOB and the ['name'] as type in my tabel.
$query = $this->connection->prepare("SELECT * FROM images");
$query->execute();
$row = $query->fetchAll();
foreach($row as $img){
echo "<pre>";var_dump($img['name']);"</pre>";
echo "<img src=".$img["name"].">";
}
//header("Content-type: ".$row['type']);
print $row['name'];
die();
Should i use ['tmp_name'] or ['name'] in the <img>
?