Re: How to navigate backwards in PHP ???
| From: | Anup | Date: | Sat, 12 Oct 2002 02:42:47 +0000 |
| Subject: | Re: How to navigate backwards in PHP ??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119709@lists.php.net to get a copy of this message | ||
Well, if you have control for the referring page, then create a hidden value
whose value is the URL. Then you can use that. The problem is that PHP is a
server-side language not a client-side (like JS), so PHP has no control over
the browser.
"-<>-" <cerberus@mail-telia.dk> wrote in message
news:cgsequo9evsmjbuvr3dtkfjai4losn6mop@4ax.com...
> This is really puzzling me ... I've tried finding the answer in the manual
> ... but sofar without luck...
>
> What I need to is simply to be able to make a go-back link that points to
> the URL that contains the page that had the link that send the user to the
> current page ... (did that make sense?)
>
> Or to put it another way: I need to be able to have a link on page A,
> point to page B, and then have page B know the exact URL of page A
> (including all variables that's needed to build page A).
>
> The thing is that simply using <a href="javascript:history.go(-1)">
> doesn't work because the internal links adds the hash-mark (#) after the
> URL, and then the browser needs to go one more step backwards for each
> time the user clicks on an internal link ...
>
> I could easily write a JS function to handle all of this, but my goal is
> to not use any JS at all, and really, this is something that ought to be
> easily doable in PHP ... only I can't figure out how ... does it have
> something like Document Referrer ??? which could contain the URL of the
> sender, which I'd then be able to plump into a variable, which could then
> be used when generating the links to go back to the sender page...
>
> TIA
>
> Rene
> --
> Rene Brehmer
> System developer in the making...
>
> This message was written on 100% recycled spam.
>
> My website: http://www.geocities.com/cerberus_hotdog
> Babes and computer & internet references...