troubleshooting Question

PHP: switch through user details based on userid in url with previous and next buttons

Avatar of peps03
peps03 asked on
PHP
2 Comments1 Solution473 ViewsLast Modified:
Hi,

On my first page i have a list of users, say 7. when one is clicked on you get to see his details.
Now, the userid for which the information is needed is sent via the url: ?userid=1.
(but only of 1 user)

What i'm trying to do is, when on the detail page of a user, create a previous and a next button to switch between the detail pages without having to go back to the overview page.

how do i pass the correct userids to the links of the previous and next buttons?

should i grab the userid's on every page from the db and assign the one before the current to the previous button and the following id to the next button? (if so, how do i get the previous and following userids from a string?)

or is there a better method?
ASKER CERTIFIED SOLUTION
Derokorian

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros