简体   繁体   中英

Displaying all users on the same URL page

Is it possible to view all users on the same URL? I am using $_SESSION['username'] to view the username when logged-in.

Example:

The full URL 1 is

https://www.example.com/admin/support.php?pager=1

Page 1 of the URL page

The full URL 2 is

https://www.example.com/admin/support.php?pager=2

Page 2 of the URL page

Using this code I can get the full URL of that page:

$link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";

So example in URL #1, if user 1, 2 and 3 is on that page it will show on that page their usernames. And in URL #2, If user 4 and 5 is in there, it will also show their usernames on that page (URL #2 not in URL #1).

What is the logic/way to implement this and to show every page all users on it?

Use DataTable or Normal Table to View all User in a Page by simple Query.

Don't use the url Parameter to get the user.

Use .htaccess for URL beautification because xxx.com?id=1 is simply hack-able stuff.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM