title: submit a form when hitting the browser back button
body: <p>I have a page for asking queries to an SQL database. Its only purpose is to allow students to exercise. Depending on the students activity the page rewrites itself with new content so that the student may enter a query, have the resulting table shown or get an error message.</p>
  
  <p>All is working through forms that post data to the same page.</p>
  
  <p>However, if a student uses the back button or the forward button (after hitting the back button) data gets lost as I cleanse the $_POST variable content to get ready for new action.</p>
  
  <p>There is, however, a "go back" button that assembles data to restore the previous page by POSTing the required data. Is it possible to use some kind of technique, javascript, html5, PHP or whatever to actually submit the form that posts the assembled data when hitting the browser back button?</p>
  
  <p>I am using HTML 5, PHP 5 and some JavaScript (not JQuery but if it gives me an option ...)</p>