Page 1 of 1

Image Gallery Code [Help please!!]

Posted: Wed Oct 15, 2008 8:54 pm
by chrismanahan
Hey everyone. I'm completely new to php and have been learning as I've worked over the past week or so. I'm working on an image gallery. Right now I have it based mainly on 3 different pages based on templates. Index.php, gallery.php (which uses a function to read a directory and display only jpgs), and display.php. The display page is my problem.

When you click an image in the gallery, it goes to it on the display page. I set the variables in the url and use $_GET to get them into the code. What I want to do is when you click on an image in display.php, for it to go to the next one.

For a better idea, this is my site's gallery page I've been working with.
http://chrismanahan.co.cc/gallery.php?gallery=kppc1

Re: Image Gallery Code [Help please!!]

Posted: Wed Oct 15, 2008 10:08 pm
by requinix
You were able to get a list of pictures before, right? On the main page?
Do it again, and then go through the list until you find the image you're currently displaying. Then use the filename of the next image for the link.