Robert Sossomon wrote:

I am not trying to authenticate off of a database though.  I have
scripts that automatically modify the .htaccess file as I change a user,
so I need to authenticate off the .htaccess file and store the users
information into a cookie.  I think from the cookie I can do everything
else, just not sure how to get the information from the browser to show
me the user of the page.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"I am a quick leaner, dependable, and motivated."

-Real live resume statement ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----Original Message-----
From: Chris Shiflett [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 11:53 AM
To: Robert Sossomon; [EMAIL PROTECTED]
Subject: Re: [PHP] Authentication



--- Robert Sossomon <[EMAIL PROTECTED]> wrote:


I currently use a .htaccess file for users to login, and now I need to


make some changes to how the site works.

I need to be able to have the users login, and once that is done the login needs to be used to pass through the database.


Search PEAR (http://pear.php.net/), because I'm pretty sure there are
aome authentication classes that let you use a database to store the
access credentials.

Hope that helps.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security Handbook
     Coming mid-2004
HTTP Developer's Handbook
     http://httphandbook.org/

Well, you could use PEAR::Auth to do these things without having to write to a .htaccess file (That's a potential security risk).


Then answer to your question is $_SERVER['PHP_AUTH_USER']. That variable will give you the currently logged in user. $_SERVER['PHP_AUTH_PW'] is the password.

--
paperCrane <Justin Patrin>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to