Actually preventing the user from using the back or forward button is bad usability and will frustrate users a lot - to be blunt, it's passing a developer problem back to the user.
I think the Post/Redirect/Get pattern, coupled with window.onbeforeunload
in javascript (like SO uses) would be really useful for your circumstances.