homepage Welcome to WebmasterWorld Guest from 107.20.37.62
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
how to arranging thumbnails in php and html gallery
I print images from mysql data table where they r saved as blobs
nil111




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

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:

[CODE = PHP]

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>';

[/CODE = PHP]
here $row['p_painting_id'] is nothing but mysql.

.........................

in gallery_print_thumb.php I have,

[CODE = PHP]
<?php

$image_id = $_GET['id'];
header('Content-Type: image/jpeg');
@mysql_connect("localhost","root","dba") or die("Error");
@mysql_select_db("gallery");
$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];
}

?>
[/CODE = PHP]

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!

 

nil111




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

advance! :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved