Welcome to WebmasterWorld Guest from 54.162.108.167

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

php log file using mysql

log file using mysql with cms integration

     
4:45 am on Sep 27, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:July 27, 2010
posts: 54
votes: 0


hi! i had created a cms in php, now i want to have a log file w/c is saved in mysql. how to i start creating a log file? basically what is does is saved the activities of the user and gather the information such as browser, ip, username, and login time and out. hope to hear from you guys!
9:15 am on Sept 27, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 5, 2008
posts: 94
votes: 0


Hi, looks like all you need to do is create a table in your database with fields for User Agent data, the username from the session etc and have a simple function that adds this data to your table when you need it - on login / logout etc. The PHP docs on mysql functions are a good place to start looking [uk2.php.net...]
11:36 pm on Sept 27, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:July 27, 2010
posts: 54
votes: 0


thanks for the quick reply, so i need all those session to store onto my DB? can you give me some samples on that? im still learning.. and thanks again.