Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8811691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:25:40+00:00 2026-06-14T03:25:40+00:00

I have created a really basic PHP photo gallery for my website, which gathers

  • 0

I have created a really basic PHP photo gallery for my website, which gathers information from a MySQL database. Using a while loop, I list three images (from ID 1 to 3) in one row, and continue until 12 images have been displayed.

This works perfectly fine if you have uploaded 12 images, but some of my users have uploaded 12 and I need to know how to make another page for images 13-24, etc. I have looked at the source code of some PHP galleries yet nothing has helped me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:25:42+00:00Added an answer on June 14, 2026 at 3:25 am

    This depends on your code setup, but mainly, you are talking about pagination.

    A basic way to do that would be to add a URL param like http://www.exemple.com/photos?page=2,
    detect that params in your PHP code, and fetch your photos in your Mysql database accordingly, something like that:

    $num_per_page = 12;
    $offset = $num_per_page * ($_GET['page'] - 1);
    $query = "SELECT * FROM photos LIMIT $offset, $num_per_page";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a basic project in to which i have added a really
I am writing a pretty basic php app and have created a pretty big
I built a really basic php/mysql site for an architect that uses one 'projects'
I have created a really basic project (Make) like this: (ede-proj-project zrm :name zrm
I have created a html page which sends custom data to a php file
I have created my SSRS report in VS2010 and it looks really good. Upon
I am really struggling with the facebook api. A have created a app, an
I have created 3 classes as following Ext.mine.TextParent - Inherting from Textfield Ext.mine.child.TextChildA -
I have created an android application that calls (using kSOAP library) a SOAP based
I am creating a classifieds website. Im storing all ads in mysql database, in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.