title: Store forms in session and back button
body: <p>I'm trying to achieve the following scenario:</p>
  
  <pre><code>1. user display the page addBook.php
  2. user starts filling the form
  3. but when he wants to select the book Author from the Author combo box, the Author is not yet created in the database so the user clicks a link to add a new Author
  5. user is redirected to addAuthor.php
  6. the user fill the form and when he submits it, he goes back to addBook.php with all the previous data already present and the new Author selected.
  </code></pre>
  
  <p>The things is: I have scenarios where there is more than one level of recursion. (Example: Add Book => Add Author => Add Country)</p>
  
  <p>How can I do that?</p>
  
  <pre><code>At step #3, the link submit the form so that I can save it in session.
  To handle recursion, I can use a Stack and push the current from on the Stack each time I click a link. And pop the last form of the Stack when the user completes the action correctly or click a cancel button.
  </code></pre>
  
  <p>My problem is:</p>
  
  <p><strong>How can I handle the back button of the browser?
  If instead of clicking the "cancel" button, the user click on the back button, how could I kown that I need to pop the last element?</strong></p>
  
  <p>Do you known some common pattern to achieve that?</p>