Re: previous page

From: Date: Wed, 09 Jun 2004 12:41:15 +0000
Subject: Re: previous page
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-187939@lists.php.net to get a copy of this message
Larry, Thanks all makes sense, but, if I add this: <?php echo($_SERVER['HTTP_REFERRER']); ?> I don't get anything back when the page is called? Cab "Larry E . Ullman" <LarryUllman@DMCInsights.Com> wrote in message news:631DFA8B-B9BE-11D8-B386-000393641AFC@DMCInsights.Com... > > I have a .php page I don't want anyone being able to just open it > > unless > > they've been through a previous page that is a disclaimer http > > referrer etc > > come to mind but not exactly sure how to implement it in PHP. > > Yes, you could check the value of $_SERVER['HTTP_REFERRER'] but that's > not perfect. Instead, you could have the previous page contain a form > with a special hidden input. The form is submitted to the protected > page, where you check for that hidden input's value. If that protected > page doesn't receive $_POST data containing whatever meaningful data, > redirect them accordingly. > > Hope that helps, > Larry

« previous php.general (#187939) next »