Re: Most portable back button in php
| From: | Henry | Date: | Thu, 08 Aug 2002 15:40:47 +0000 |
| Subject: | Re: Most portable back button in php | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111673@lists.php.net to get a copy of this message | ||
I have an idea then.
How can I best generate a full URL from PHP_SELF and other variables on the
referrer page such that I can generate the back link on the page I get to
even if the referrer page is on a different server?
as an eample if I know that the page to go back to will be at
http://www.myprimary.com/referrer.php and I
generate a page at
http://www.mysecondary.com/info.php I can ensure
that there is the following
html in place
<a href="http://www.myprimary.com/referrer.php">go
back</a>
TIA
Henry
"Stas Maximov" <maximov@eircom.net> wrote in message
news:008601c23eef$cc25f260$ec000064@nexus...
> Yes, indeed. Thanks, Justin, I forget to mention this one. It works really
> well on forums and comments, i.e. the cases when you do POSTs. The good
> thing here is that you passing the whole URL (taking it from PHP_SELF), so
> you save on the decision logic in the end.
>
> Regards, Stas
>
> ----- Original Message -----
> From: "Justin French" <justin@indent.com.au>
> To: "Stas Maximov" <maximov@eircom.net>; "Henry"
> <henry@teacake.f9.co.uk>
> Cc: "PHP General" <php-general@lists.php.net>
> Sent: Thursday, August 08, 2002 4:03 PM
> Subject: Re: [PHP] Most portable back button in php
>
>
> > Just to add in some more ideas, you can always pass the referring script
> to
> > the second script manually...
> >
> > I do this when someone has to login, then return back to the original
page
> > they were on... I just get the URL + query string, base64_encode() it,
> then
> > pass it around in the URL or POST until i need it, then base64_decode()
it
> > and header("Location: ...") the user to the right page.
> >
> > Works really well, depending on your situation.
> >
> >
> > Justin
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>