title: Best way to Go Previous page in PHP
body: <p>I'm using a button to go back page (let zero.php) so I'm using this</p>
  
  <pre><code>&lt;input type="button" value="Back" class="button" onClick="javascript:history.go(-1)" /&gt;
  </code></pre>
  
  <p>but it fails when we do some stuff on  that page </p>
  
  <p>Like from <code>one.php</code> we add some data and go to <code>two.php</code> (where a database query runs) and again comes to <code>a.php</code> and then click on that button then it goes nowhere (logically it should go to <code>two.php</code> but there is header location of <code>one.php</code> is described)</p>
  
  <p>Another method is</p>
  
  <pre><code>&lt;a href="last.php"&gt;&lt;input type="button" value="Back" class="button" /&gt;&lt;/a&gt;
  </code></pre>
  
  <p>but it look very odd</p>
  
  <p>Please suggest me the best way to go back  through  <code>&lt;input type="button"&gt;</code> or </p>
  
  <pre><code>&lt;button type="submit"&gt;
  </code></pre>