Re: Most portable back button in php

From: Date: Thu, 08 Aug 2002 16:00:51 +0000
Subject: Re: Most portable back button in php
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-111676@lists.php.net to get a copy of this message
Well, this is a bit different from what I was talking about (internal site navigation). And has nothing to do with PHP_SELF. In this (I'd say - rare case) you would do: if http_referer contains "myprimary.com" print back link using http_referer else do nothing or put the link to some other appropriate page endif HTH, Stas ----- Original Message ----- From: "Henry" <henry@teacake.f9.co.uk> To: <php-general@lists.php.net> Sent: Thursday, August 08, 2002 4:40 PM Subject: Re: [PHP] Most portable back button in php > 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 > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#111676) next »