开发者

how can I display the last 4 users in the footer [closed]

开发者 https://www.devze.com 2023-02-09 11:23 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

I was wondering if there is a way I can display the last 4 users on the footer of my website the script I am running is using the smarty template engine. Im not sure if that is enough in开发者_JAVA技巧formation but let me know if I should include anything else in my question thanks , Cam


That's not enough info to help. So here is a generic answer:

  • When a user is logged in, update a database field current_users with timestamp and name.
  • On your main page, query said DB table, order by timestamp and limit 4.
  • In your template footer, do a smarty loop over the db query result, print out the names.

You can clarify your answer with [edit] at any time. But note that Stackoverflow provides programming advise, not necessarily free code and complete implementations.

0

精彩评论

暂无评论...
验证码 换一张
取 消