hi there im new to php and im currently building my website .,it's more like an online store and i would like my products to be listed in a gridview., i have a database and my only problem is how to display the images .., i've already displayed some info like the id and some description ., ive been searching the web for the right codes and tutorials that could help me about this but nothing seem to suit my site..,
my database contains: petid(int), petname(varchar),birthdate(date), image(blob)
here is my connection.php
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$db = 'store';
$conn = mysql_connect($dbhost,$dbuser, $dbpass);
mysql_select_db($db);
?>
then here is my code inserted in an html page to retrieve the database contents
<?php
include 'includes/connection.php' ;
$query = ("SELECT * FROM pets");
$result = mysql_query($query);
while($dog = mysql_fetch_array($result)){
$petid = $dog ['petid'];
$petname = $dog ['petname'];
$Birthdate = $dog ['Birthdate'];
echo "<h3>" . $dog['petid'] ."</h3>";
echo "<P>" . $dog['petname'] ."</P>";
echo "<P>" . $dog['Birthdate'] ."</P>";
}
?>
any help would be appreciated :$ or if anyone here who have any alternative on displaying the image... ive heard about image pointers stored in the database would be much easier but i dont know how it works..