Hi
Is ther a funtion in PHP or mySQL that gets the windows logged in user name please?
I am creating a mysql database which has data for all users but I want the mysql query to return on records for the current windows logged in user
I have an intranet and would like to display a greeting ie good morning <windods username> eth
thanks
Windows User name
Moderator: General Moderators
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
*cough* ntlm authentication *cough*If you REALLY need that functionality, I'd try grabbing their IP with PHP, then using exec to run a c++/java/shell/whatever script to grab their username over the intranet. Although I'm not sure if theres a way to do it with those languages either..
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Try checking the output of:
Should be in there.
Mac
Code: Select all
echo '<pre>';
print_r($_SERVER);
echo '</pre>';Mac
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
The windows username won't be in there but the IP address used to connect will be. Often that IP will just be the IP of a gateway/proxy howevertwigletmac wrote:Try checking the output of:Should be in there.Code: Select all
echo '<pre>'; print_r($_SERVER); echo '</pre>';
Mac
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
I can grab the windows username (NT login ID) from my intranet server at work - spose it depends on the setup.d11wtq wrote:The windows username won't be in there but the IP address used to connect will be. Often that IP will just be the IP of a gateway/proxy howevertwigletmac wrote:Try checking the output of:Should be in there.Code: Select all
echo '<pre>'; print_r($_SERVER); echo '</pre>';
Mac
Mac