Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pagination active link

Featured Replies

below is some code that i loop through records creating an unordered list. basically a table just in list form. What i want to do is in the url i have a variable being passes called page= and whatever page number i get at that time. I have a css style that when im on a specific page the pagination link that corresponds to that page should be green so i know by looking at pagination links what page im on instead of looking at the url for page number. how do i do that?

 

$n = 1;
                        while ($n <= $totalLinks and $totalLinks > 1)
                            if ($page == $n) {
                                echo '<li><a href="' . $_SERVER['PHP_SELF'] . '?page=' . $n . '&skip=' . $skip . '&max=' . $max . '">' . $n . '</a>&nbsp;</li>';
                                $n++;
                            } else {
                                $skip = ($n - 1) * $max;
                                echo '<li><a href="' . $_SERVER['PHP_SELF'] . '?page=' . $n . '&skip=' . $skip . '&max=' . $max . '">' . $n . '</a>&nbsp;</li>';
                                $n++;
                            }
 
The li tag thats active would be <li class="active">. Each time i click a page number on pagination links it should highlight for that page number.

figured it out my self. Sorry.. played with it and realized it was like supper simple what i did. Im learning php along with php for api for filemaker so im not familiar with it all.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.