RE: [PHP] members page

From: Date: Wed, 07 Mar 2001 04:27:05 +0000
Subject: RE: [PHP] members page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-42850@lists.php.net to get a copy of this message
> If you're authenticating via .htaccess you can use the > environment variable "REMOTE_USER" to use as the > username to do the select on the db. Something > like: > > $user = getenv("REMOTE_USER"); > $sql = "Select * from usertable where username = '$user'"; I'm (currently) using PHP3.0.15 and finding that the variable $REMOTE_USER gets reset to null on subsequent pages inside the secured area... so I've been assigning it to another variable and then passing this through form posts to subsequent pages... I'm guessing this getenv("REMOTE_USER") will also clear ... am I correct? Of course, I may need to rethink everything as I found a snag tonight... If I try to post a form back to my /index.php page (the one which originally triggered the authentication) the webserver throws up an Authentication Required error on me... because the browser (IE 5.01) has forgotten what it's said previously. (I think I'm going to have to use the index.php page as an intermediate page, and put the menu structures that I want to return to on a different page) Have I hit on a bug, or is this happening by design???

« previous php.general (#42850) next »