Photo Gallery tutorial

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Im trying to create a photo gallery for my website and i am looking for  
a good tutorial. I need the gallery to be able to do the following:

create thumbnails
create folders
display clicked thumbnail in original size.

I was wondering if anyone would know of any good tutorials so that i can  
learn how to do this.

Thanks in advance


Re: Photo Gallery tutorial

Glenn Coyle wrote:

Quoted text here. Click to load it

Something I found a long time ago was imagebrowser.php

works okay,  and I have even taken it and used parts in an online viewer for a  
Custom Jeweler. (work in prgress)  at (see  
the products button at the top right...

Images are stored in a particular directory and the description is  
store/retrieved from a MySQL database.

Michael Austin.
DBA Consultant
Donations welcomed. Http://

Re: Photo Gallery tutorial

<Sun, 19 Feb 2006 18:59:33 GMT>

Quoted text here. Click to load it

Had a quick look on the hard disk and found this , Did it months ago  
when I started learning php .

From what I remember of it .....

It scans the images folder for images - then creates the thumbnails .

Rather crappy code that I would rewrite these days and your on your own  
as its only intention is to get you started .


$dirname = "images";
$dh = opendir($dirname);
while ($file = readdir($dh))
if (is_dir ("$dirname/$file"))
print "";
if ($pussy>4)
closedir ($dh);




if ($test1<>".jpg")

print "$file";

$width_ratio=($size[0] / $max_width);
$height_ratio=($size[1] / $max_height);
if($width_ratio >=$height_ratio)  
$ratio = $width_ratio;
$ratio = $height_ratio;
$new_width=($size[0] / $ratio);
$new_height=($size[1] / $ratio);

print "<img src=$new_name>";

print "<br>";


Site Timeline