Jump to content
Larry Ullman's Book Forums

Filter Paginated Results With Checkboxes - Where To Start

Recommended Posts

Hi HartleySan,


I have been “echoing out” the variables and the problem seems to be the $start and $_GET['s'] variables.


When a checkbox has been selected, the page will load and display a certain number of pagination links (numbers) depending on the total number of results. I now click to page 4 (as an example). On page 4, I select another checkbox and load the page. The page will load but will display the same current pagination link as before I selected a new checkbox. The  $_GET['s2'] variable already has a value of 4 and so this value is assigned to the $start variable. I don't know if I can use a loop to say that every time the $string variable is set the below code will run from the beginning again.

// Determine where in the database to start returning results...
if (isset($_GET['s']) && is_numeric($_GET['s'])) {
        $start = $_GET['s'];
} else {
        $start = 0;

Will keep on trying.



Thank you for your help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...