> 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???



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to