开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜