hi guys.. need your help for retrieving selected images from the database and display it in thumbnails.. thanks

<?
mysql_connect("localhost","root", "");
mysql_select_db("dbname");
$query = "SELECT Pics from tblPic";
$result = mysql_query($query);
echo '<table>';
while ($r=mysql_fetch_array($result))
{
$pic = $r;
echo '<td><img src="'.$pic.'" width="32" height="32"></td>';
}
echo '</table>';
?>
<?
mysql_connect("localhost", "root", "");
mysql_select_db("dbname");
$query = "SELECT Picture FROM tblPics";
$result = mysql_query($query);
echo '<table>';
while ($r=mysql_fetch_array($result))
{
$pic = $r;
echo '<td><img src="'.$pic.'" width="32" height="32"></td>';
}
echo '</table>';
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.