开发者

Making an image gallery, how?

Making an image gallery, how?

This is the idea of what I want to do. Let the user upload an image and display it in the gallery. The gallery shows the first 8 thumbs, with 2 rows of 4, and when you click on it the users sees the image in a fancybox. But how can I get the开发者_运维百科 right 8 images from my database? I know you can SELECT * FROM table limit number,number But I don't know how to calculate those numbers with PHP. Can someone help me set up my gallery?


You probably have information about the current page the user is on like as a GET parameter "p". Now you can simply use that to find your missing numbers. The first one would be p*8 and the second one p*8+8. Those would be the pictures you want to display on the current page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜