yaricks Posted May 25, 2010 Share Posted May 25, 2010 Allright, so… I have an "edit user" form. And what I want to do is find out what the person changed, and insert that into a separate "log" table in my MySQL database. Is there any way to do that? Link to comment https://forums.phpfreaks.com/topic/202858-find-out-what-has-changed-and-insert-it-into-a-separate-table/ Share on other sites More sharing options...
premiso Posted May 25, 2010 Share Posted May 25, 2010 Yep. create the Log table, and then on the user edit processing page write the data to that new log table. Should be straight forward, especially if you wrote the user edit form / have access to it. Link to comment https://forums.phpfreaks.com/topic/202858-find-out-what-has-changed-and-insert-it-into-a-separate-table/#findComment-1063119 Share on other sites More sharing options...
yaricks Posted May 25, 2010 Author Share Posted May 25, 2010 Well, yes... I have that, but I want to use the log table on multiple things, SO! I want to insert into the log page only what has changed. I guess I could use if($OriginalValue != $PostedValue) $NewLogVariableWithNewInfo But it seems like a lot of unnecessary lines of code and extra stuff in the database? Or is it the only way? /Yaricks:) Link to comment https://forums.phpfreaks.com/topic/202858-find-out-what-has-changed-and-insert-it-into-a-separate-table/#findComment-1063120 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.