Connecting Tech Pros Worldwide Help | Site Map

Image Pagination

Newbie
 
Join Date: Oct 2009
Posts: 12
#1: 4 Weeks Ago
Can you explain how to make links in php that displays images using next and previous links...?
Markus's Avatar
Moderator
 
Join Date: Jun 2007
Location: York, England, with wolves.
Posts: 4,936
#2: 4 Weeks Ago

re: Image Pagination


Quote:

Originally Posted by regan2007 View Post

Can you explain how to make links in php that displays images using next and previous links...?

Can you elaborate on your question a little more? It is slightly vague.

Thanks,
Markus.
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#3: 4 Weeks Ago

re: Image Pagination


in short, assign every page of a certain image an id and pass the previous/next ids to the links.

although this can be done with some lines of Javascript too.
dlite922's Avatar
Expert
 
Join Date: Dec 2007
Location: Moon, Dark Side
Posts: 1,094
#4: 4 Weeks Ago

re: Image Pagination


If you image ids/names are in a database you could do pagination with the LIMIT SQL control.

You'd just display 1 item per page, so you're (dynamically-built) SQL would look like this:

LIMIT 0,1
LIMIT 1,1
LIMIT 2,1
LIMIT 3,1

peace out

Dan
Newbie
 
Join Date: Oct 2009
Posts: 12
#5: 4 Weeks Ago

re: Image Pagination


For example I have three images named "image1.jpg" and the second named "image2.jgp" and the third named "image3.jpg" .Then I inserted the url of the images in the database,then I want to make two links with a label "previous" and the second label "next".The next link has a functionality that will show "image2.jpg" if it is clicked once, and if it is clicked again,then it will show "image3.jpg" then the previous link will show the the images previously viewed...
Reply