CodeIgniter Forums
looking for the best way to handle an "undo change" action - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: looking for the best way to handle an "undo change" action (/showthread.php?tid=9796)



looking for the best way to handle an "undo change" action - El Forum - 07-09-2008

[eluser]Dagobert Renouf[/eluser]
Hello guys,

I'm creating a small CRUD to help me earn big time during projects.
I want it to be really cool as a user experience, that's why I handle undo actions for delete and edit of the rows.

My "undo edit" is handled this way : when the user goes to the edit page of a row, a session storing all current values is created. when the user submit values, as he goes back to the home panel, he sees a little box saying he just updated an article and that he can undo that. If he press undo, the system updates the row again with, this time, the values stored in the session data.

I'm not sure it's the best approach, what do you think ?


looking for the best way to handle an "undo change" action - El Forum - 07-09-2008

[eluser]Yash[/eluser]
Rather going for session use database for storing undo elements.
In this way you can simply create a stack i.e. required for undo/redo


looking for the best way to handle an "undo change" action - El Forum - 07-09-2008

[eluser]Dagobert Renouf[/eluser]
thank you Yash.

so you suggest like a table keeping track of every user action, that's cool time machine !