--- Robert Cox <Robert.Cox@xxxxxxxxxxx> wrote: > Is it possible to use the "$_SERVER['PHP_AUTH_USER'];" construct in > a URL > forwarded site? I am trying to find the authorised user id so that > I can > access an SQL database with it. Anyone got some ideas? > > PHP looks like this.... > > <?php > //Get User > $user = $_SERVER['PHP_AUTH_USER']; > > // Get User type > $db = mysql_connect(localhost, ....., .....) or die("Can't > connect to > database: ".mysql_error()); > mysql_select_db(................) or die("Can't select > database: > ".mysql_error()); > > $query = "SELECT * FROM user WHERE staffid LIKE $user"; > $result = mysql_query($query) or die ('Not a valid User: ' . > mysql_error()); > .... > ?> > Robert, I think this link will help you to solve the problem..... http://bugs.php.net/bug.php?id=29132 --- Nirmalya Lahiri [+91-9433113536] ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php