RE: [PHP] members page

2001-03-06 Thread Scott Brown


 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]




Re: [PHP] members page

2001-02-19 Thread Thomas Deliduka

On 2/20/01 1:11 AM this was written:

 im making a webdesign website that has a members login, do i have to
 make a member page for each member or can i get the
 info from the database of the person whom logged in and put it on the
 members page

If you create a table in a database that holds the information that you want
to capture for them with the username as the key to the database (no
duplicates) then when they login and they're authenticated. You can pull all
necessary information you want to track on them from the table and create
your page. So, one, physical page for all users.

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'";
-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/



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




[PHP] members page

2001-02-19 Thread Brandon Feldhahn

im making a webdesign website that has a members login, do i have to
make a member page for each member or can i get the
info from the database of the person whom logged in and put it on the
members page


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