Hi All,
I am seeing that there is no way to retrieve more than 1 image from a mysql table?
I have googled it, looked into 10's of websites.. no solution.
How can i simply retrieve many pictures from a table,with the other columns if possible, please?
and i also know that there is an issue around:
header('Content-type: image/jpg')
that it cannot be used more than once??
any suggestion is highly appreciated :)
thanks!!!
here is the code
<?php
// open connection
$con = mysql_connect("localhost","root","");// connecting to host
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
// selecting db
mysql_select_db("db", $con);
// the select statement
$query = mysql_query("SELECT * FROM images");
// executing and retrieving it
while ($row = mysql_fetch_assoc($query)){
header('Content-type: image/jpg');
echo $row['image'];
}
mysql_close($con);
?>