Search code examples
phpzend-frameworkbrowserzend-formzend-studio

Zend - check if the back button of browser was pressed


This is the scenario: I fill a form and I insert something in my database. After that I am redirected automatically to another form. If the user presses the back button of the browser and thus this second form isn't filled and submited, I want to delete from the database what he previously inserted.

How can i know if the user pressed the back button of the browser?


Solution

  • I gave up on the idea of inserting and then deleting. I've chosen to insert the data after both forms are filled. Thank you Rikesh Shah for the idea! And thank you all for your answers!