I've a issue. I want to display .jpg image from blob.
I can display it in scripts. For example...
<?php
$db = mysqli_connect('xxxxx', 'xxxxxx', 'xxxx', 'xxxxx');
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
foreach ($db->query("SELECT * FROM `pictures` WHERE imageID = 3") as $result) {
header("Content-type: image/jpeg");
$img = $result['img'];
print $img;
}
?>
In index page is this link:
echo '<img src="/wszystko/obiektowy_obrazki/img.php">';
And now... I want to display It by this link:
echo '<img src="/wszystko/obiektowy_obrazki/$img.jpg">';
How can I do It? Thanks for help.