Right, but that involves changing your database and adding hidden form fields to your app in order for it to work on a multi process environment (like every production server should be.)
My solution is basically the same amount of lines, requires no such changes.