Hello
I am able to display the images that i am retrieving from the database as a list. But i want to know how i will be able to display the same images as a grid or table.
I have posted my code below.Can you please let me know how to alter the code to get it in a griew or table format. Any help will be appreciated.
booklist.php
<?php
$database="login";
$con=mysql_connect("localhost","root","");
if(!$con)
{
die('could not connect'.mysql_error());
}
mysql_select_db("$database",$con);
echo "Connection established";
$query = ("SELECT * FROM Books");
$result = mysql_query($query);
while($dog = mysql_fetch_array($result)){
$petname = $dog ['BookName'];
echo "<P>" . $dog['BookName'] ."</P>";
echo "<img src='".$dog['Photo']."' alt='dog' width='200' height='200' />";
}
?>