Re: previous page

From: Date: Wed, 09 Jun 2004 02:40:36 +0000
Subject: Re: previous page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187924@lists.php.net to get a copy of this message
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 (#187924) next »