Eiolon Posted January 11, 2008 Share Posted January 11, 2008 I am looking for a tutorial that allows me to create a logging system for my application. Basically, I want it to log what a paticular user does such as deleting something or making an edit, etc. Thanks! Quote Link to comment Share on other sites More sharing options...
cunoodle2 Posted January 11, 2008 Share Posted January 11, 2008 I did a quick google search and came up with... This example here Good luck Quote Link to comment Share on other sites More sharing options...
awpti Posted January 11, 2008 Share Posted January 11, 2008 Except he's looking for how to create a logging system, not a login system. Really, it's not terribly difficult. You can either fire stuff out to a flat text file or store it in a DB. Figure out what information you need to store and create a function: _system_logger('alert_level', 'action_taken', 'by_user'); ex; function _system_logger($level = 'NOTICE', $action, $user) { $action_insert = array('level' => $level, 'action' => $action, 'user' => $user); $this->db->insert('system_logger', $action_insert); } Private function, only you will ever call it.. My above example relies on the ActiveRecord library included with CodeIgniter, but it gives you the idea of how it works. Just make a function that either does a fwrite() or mysql_query('insert into...'); Quote Link to comment Share on other sites More sharing options...
teng84 Posted January 11, 2008 Share Posted January 11, 2008 men your example maybe good but for a noob do you think it helps? This is always being asked here. but I believe if you know how to connect and query using a scripting language(PHP) then you should be fine I suggest learn the basic before jumping to a complicated codes learn how to <a href="http://www.w3schools.com/php/php_mysql_select.asp> query</a> mysql in php first and study the use of <a href="http://www.php.net/manual/en/ref.session.php">session</a> Quote Link to comment Share on other sites More sharing options...
Eiolon Posted January 11, 2008 Author Share Posted January 11, 2008 I know how to do basic MySQL and PHP and have a good idea on how to accomplish the task. I was really just looking for a tutorial so I could get some ideas for it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.