Posted by Rik on 03/07/07 22:18
Simon Harris <too-much-spam@makes-you-fat.com> wrote:
> Hi All,
>
> I am trying to get the username of the currently logged on user.
>
> - The protected directory is /admin, within which is .htaccess as foll=
ows
> AuthName "mysite.co.uk - Admin"
> AuthType Basic
> AuthUserFile /usr/local/psa/home/vhosts/mysite.co.uk/httpdocs/.htpassw=
d
> require valid-user
> - On /admin/index.php I have tried the following:
>
> $authUser =3D $_SERVER['LOGON_USER'];
> and...
> $authUser =3D $_SERVER['PHP_AUTH_USER'];
>
> Both return an empty string/null when printed to the page
Fast & simple:
print_r($_SERVER); and see for yourself.
-- =
Rik Wasmus
Posted on Usenet, not any forum you might see this in.
Ask Smart Questions: http://tinyurl.com/anel
Navigation:
[Reply to this message]
|