You are here: Re: Username of currently logged on user? « PHP Language « IT news, forums, messages
Re: Username of currently logged on user?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация