Welcome Guest, Not a member yet? Register   Sign In
looking for the best way to handle an "undo change" action
#1

[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 ?
#2

[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
#3

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

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




Theme © iAndrew 2016 - Forum software by © MyBB