On Friday 08 March 2002 00:36, Dave wrote: > Hello all, > > I have an .htaccess and .htpasswd file in a directory. This is working > fine, when anyone attempts to enter this directory, they are prompted for a > user name and password, and if correctly entered, the page will load fine. > > What I would like is the ability to capture, or trap the user name. > > Immagine, in the simplist example, when the form loads, I could have > > <? > print "Hello".$username; > ?> > > Assuming $username was the varable for the user who logged in.
Use $PHP_AUTH_USER & $PHP_AUTH_PW. Read the manual chapter "HTTP authentication with PHP". -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk /* My idea of roughing it is turning the air conditioner too low. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php