Beyond what laserlight had pointed out (which is a good point).. when working with IIS / IE Authentication (keep in mind only IE will automatically pass the variable to the server)
try:
print_r("<pre>%s</pre>",print_r($_SERVER,true));
and take a look at all system variables which are not being played with by your browser, it will basically display "pain text".
Be sure that you are trapping the correct string.
pgrantuk wrote:
The page will display my user id ie TestDomain\TestUser
Please note that you have to backslashes (\). In PHP, with the "double quote" (") when you enter:
<?php
$user = $_SERVER['LOGON_USER'];
if ( $user == "TestDomain\\TestUser" )
Print "$user"
?>
PHP see's it as TestDomain\TestUser
This is the correct convention (with AD Domain\User) however I just wanted to ensure that your output and condition statements are checking for the same thing.