Re: Most portable back button in php

From: Date: Thu, 08 Aug 2002 13:15:34 +0000
Subject: Re: Most portable back button in php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-111640@lists.php.net to get a copy of this message
You could do something like <? if(!empty($HTTP_REFERRER)) { // echo a back link with HTML } else { echo "<SCRIPT language=\"javascript\">"; //back link using document write in javascript echo "</SCRIPT><NOSCRIPT>click your browser's back button</NOSCRIPT>"; } ?> So, by default, we use the referrer. If the referrer isn't set, try to do it with javascript write if they don't have javascript, the NOSCRIPT tag kicks in and saves the day, sorta I dunno. The browser has a back button -- why can't they use that? Justin French on 08/08/02 10:16 PM, Henry (henry@teacake.f9.co.uk) wrote: > Hi All, > > What is the most portable method of generating a back button in a php page. > > Is there a way of creating a link to the referrer page etc. > > I want to make sure that it will work with all browsers so I am trying to > avoid javascripts, history etc. etc. > > TIA > > Henry > >

« previous php.general (#111640) next »