RE: [PHP-DB] http_referer question for DB access

From: Date: Thu, 12 Jan 2006 00:02:54 +0000
Subject: RE: [PHP-DB] http_referer question for DB access
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-41019@lists.php.net to get a copy of this message
I would suspect that you had a default template if there is no referer <?php $template = "default_template.php"; //or whatever you use to call it if (!empty($_SERVER['HTTP_REFERER'] )) $template = $_SERVER['HTTP_REFERER'] ; .... ?> bastien
From: "Chris Payne" <chris@artistwd.com> To: <php-db@lists.php.net> Subject: [PHP-DB] http_referer question for DB access Date: Wed, 11 Jan 2006 16:18:03 -0500 Hi there everyone, I have a system which dynamically creates a template based website which can be turned on or off by a switch, to access it a user would do http://www.websitename/templatename and then it would produce a 404 (NOT look for a dir as this allows me to use a DB switch to enable the system). However, when they enter a similar URL as the above it DOES redirect using: ErrorDocument 404 /redirect.php BUT the PHP page it redirects to, which has the following code: <?php echo $_SERVER['HTTP_REFERER'] ?> DOESN'T show the referrer page and I MUST have that in order to find what template they are aimining to look at. I can't query my MySQL DB without this information, am I doing something wrong? I did it once before about a year ago but no longer have the code and I SWEAR I did it this way. Any help would really be appreciated. Chris


« previous php.db (#41019) next »