title: PHP session back button?
body: <p>Ok. So I am using Sessions to store data because I am making a multi page form. The thing is, I need a back button with it. I have a submit button that will take the user to the next page and store the data into sessions but I need a back button next to the submit button in case they messed up for whatever reason. Is there anyway to make a back button with php that will take them back to the previous page while showing the data they entered? heres my code of one page.
  Also, I have tried using the history.go but that only works for one page.</p>
  
  <pre><code>&lt;?php
  
  //let's start the session
  session_start();
  
  //now, let's register our session variables
  $_SESSION['opinion1'] = 'opinion1';
  $_SESSION['choice1'] = 'choice1';
  
  //finally, let's store our posted values in the session variables
  $_SESSION['opinion1'] = $_POST['opinion1'];
  $_SESSION['choice1'] = $_POST['choice1'];
  
  ?&gt;
  
  &lt;!DOCTYPE html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'&gt;
  &lt;link rel="stylesheet" href="bootstrap.css"&gt;
  &lt;link rel="stylesheet" href="main.css"&gt;
  &lt;link rel="stylesheet" type="text/css" href="engine1/style.css" /&gt;
  &lt;script type="text/javascript" src="engine1/jquery.js"&gt;&lt;/script&gt;
  &lt;script src="jquery.cycle2.js"&gt;&lt;/script&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div class="nav"&gt;
      &lt;div class="container"&gt;
          &lt;h1 class="pull-left"&gt;Securing the Future of Village Walk&lt;/h1&gt;
          &lt;div class="pull-right"&gt;
          &lt;ul class="nav nav-pills"&gt;
              &lt;li class="active"&gt;&lt;a href="#"&gt;home&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;about&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;contact&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="ammendment"&gt;
      &lt;div class="container"&gt;
          &lt;form method="post" action="page4_form.php"&gt;
              &lt;textarea id="opinion2" name="opinion2" value=""&gt;&lt;/textarea&gt;
              &lt;label for="Yes"&gt;Yes&lt;/label&gt;
              &lt;input type="radio" name="choice2" value="Yes"&gt;
              &lt;label for="No"&gt;No&lt;/label&gt;
              &lt;input type="radio" name="choice2" value="No"&gt;
              &lt;label for="Neither"&gt;Neither&lt;/label&gt;
              &lt;input type="radio" name="choice2" value="Neither"&gt;
              **I NEED BACK BUTTON HERE**
              &lt;input type="submit" value="Next"&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>