Posted By

dubogii on 05/17/11


Tagged

history back


Versions (?)

“Go Back” Button


 / Published in: JavaScript
 

URL: http://css-tricks.com/snippets/javascript/go-back-button/

  1. <input type="button" value="Go Back" onclick="history.back(-1)" />
  2.  
  3.  
  4. ----------------------------------------------------------------------
  5.  
  6.  
  7. PHP Version:
  8. <?php
  9. $url = htmlspecialchars($_SERVER['HTTP_REFERER']);
  10. echo "<a href='$url'>back</a>";
  11. ?>

Report this snippet  

You need to login to post a comment.