PHP logging class - DEMO page:

So in case you don't know what this is about, you can read my article about it. This is a PHP class that easily logs to a database table all activity you want.

There are two files in this demo, this page, and the log page. In this page there are several "common" actions you would find in a website, their purpose is to let you see how each action is logged.

User login:

This is a ver simple user login, there is only one username and password, and all others will be considered "denied attempts".

        Login data:
        Username: demo
        Password: pass
        


Edit data on a webpage:

In case your website supports page edition (With some sort of CMS) you can install logging to see who and when was edited:

        For the example the following text is stored in a session variable which you can edit. Every change is logged
        This is the default text        


Contact form:

If you have contact forms in your website, you can install logging to see who contacted you, at what time, and with what ip.




Note: The contact form doesn't actually send any email. It is only used to test the logging class.

 

Now what?

In case you didn't yet, you can go see the log page, with all log entries since the last log clean up (usually done when it reaches 100 or more entries), or you can go to the original article to post your opinion there!