user1967153
user1967153

Reputation: 75

How to make an Audit Trail / Activity Log using PHP

Is there a template already out there for PHP/MySQL that tracks the activity of a user? I already have audit trail but it only gets the time of logged in/log out. Not the changes or activity he did on his/her login.

Upvotes: 1

Views: 12707

Answers (1)

Jirilmon
Jirilmon

Reputation: 1944

The best logging framework for php is log4php, since its from Apache itself. log4php has flexibility to choose the log storage (mysaql, text file or email)

However the basic idea of user activity tracking is this:

  1. Define the 'actions' performed by your website users, in a database table (action)
  2. Map actions performed by the users using one relational table (user_action)

Upvotes: 3

Related Questions