This topic is locked
[SOLVED]

 How to redirect to the last page dynamically when open the table

10/2/2018 9:23:50 AM
PHPRunner General questions
E
exora author

For example the table "users" consists of 100 records with 20 records per page so that the table consist of 5 pages at the moment and this will continue to grow . How can I redirect to the last page dynamically when open the table.
Thank you.

W
WilliamBDevClub member 10/2/2018

Why not change your sorting order so that the last record displays first?

Sergey Kornilov admin 10/2/2018

I agree with what @exora suggests. Redirect user to that list page adding a sort option on the fly. You will need to sort data by ID or Date in descending order. Here is an example of such an URL:

<table name>_list.php?orderby=dID
E
exora author 10/2/2018

Thank you for all the suggestion.
I did modifying the sorting option in other table. But in some cases we need to show the table historically and give the default screen to the last page. I try to modify to redirect with adding "?goto=5", but it will fixed and not dinamically.

I have just modified to redirect like the code below and it works for awhile, but i don't know it's common practice or not.



<table name>_list.php?goto=99999999