trapping the user name from .htaccess / .htpasswd

From: Date: Thu, 07 Mar 2002 16:36:18 +0000
Subject: trapping the user name from .htaccess / .htpasswd
Groups: php.general 
Request: Send a blank email to php-general+get-87643@lists.php.net to get a copy of this message
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. How can I do this... any ideas? Dave

« previous php.general (#87643) next »