Re: previous page

From: Date: Wed, 09 Jun 2004 13:07:21 +0000
Subject: Re: previous page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187942@lists.php.net to get a copy of this message
Then you could set a hidden form variable <INPUT TYPE="hidden" NAME="xxx" VALUE="etc"> or set a sesssion variable on the previous page. >>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.

« previous php.general (#187942) next »