I want to make a page that collects some information from the user and then modifies the database if the user clicks a button. If the user navigates away from the page without clicking the button, I don't want anything to be modified.
How do I do this without having to manually put my own button in the content area?