Re: Equivalent of Back Button
| From: | (Richard Lynch) | Date: | Fri, 09 Jun 2000 20:12:14 +0000 |
| Subject: | Re: Equivalent of Back Button | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-1430@lists.php.net to get a copy of this message | ||
In article <393FECAC.80B85913@sei.cmu.edu>, nhw@sei.cmu.edu (Nelson
Weiderman) wrote:
> I'd like to create a page that immediately goes back to the
> previous page, saving its state (equivalent to pushing the
> back button on the bowser). The following almost does what
> I want, but doesn't save the state:
>
> echo "<html><head><title>Admin Referer</title><META
> HTTP-EQUIV=\"refresh\" CONTENT=\"0; url=" . $HTTP_REFERER .
> "\"></head>";
Well, putting this at the very top would do the same as that only better:
<?php header("Location: $HTTP_REFERER");?>
I dunno what state you hope to save though...
Guess you could figure out what it is that you want saved and put that
into a GET URL.
There's no way to exactly mimic hitting the "Back" button...
Except maybe JavaScript....
<SCRIPT LANGUAGE=JavaScript>
document.location=history(-1);
</SCRIPT>
or something like that.
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)