Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

how to arranging thumbnails in php and html gallery

I print images from mysql data table where they r saved as blobs



11:18 am on Aug 13, 2008 (gmt 0)

5+ Year Member

But in my php/html gallery they are being displayed continiously.

how can i arrange them in a nice way with spaces between them? and any advice on adding paging?

in my 1st page i have:


print '<a href="gallery_large.php?id='.$row['p_painting_id'].'"><img src="gallery_print_thumb.php?id='.$row['p_painting_id'].'" alt="image"/></a>';

here $row['p_painting_id'] is nothing but mysql.


in gallery_print_thumb.php I have,


$image_id = $_GET['id'];
header('Content-Type: image/jpeg');
@mysql_connect("localhost","root","dba") or die("Error");
$result = mysql_query("SELECT p_painting_image FROM paintings where p_painting_id = '{$image_id}'");
while($row = mysql_fetch_assoc($result))
print $row[p_painting_image];


this displays the images at a stretch. i want to kow how to add spaces (using empty table rows etc) and how to add paging as well.

Thanks so much in adnavce!


11:19 am on Aug 13, 2008 (gmt 0)

5+ Year Member

advance! :)

Featured Threads

Hot Threads This Week

Hot Threads This Month