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
andlimit 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.
精彩评论