I want to create a user history function that allows shows users what they done. ex: commented on an ad, posted an ad, voted on an ad, etc.
Bunu tam olarak nasıl yapacağız?
I was thinking about... in my site, when they log in it stores their user_id ($_SESSION['user_id'])
- so I guess whenever an user posts an ad(postad.php), comments(comment.php), I would just store in a database table "userhistory" what they did based on whenever or not their user_id was activate.
- When they comment, I store the user_id in the comment dbc table, so I'll also store it in the "userhistory" table.
- And then I would just queries all the rows in the dbc for the user to show it
Ben yapabilir herhangi bir adım / iyileştirmeler? :)