RemusRigo Posted May 1, 2009 Share Posted May 1, 2009 Hi all, I want to use a script that greets the user, or something like it. I tryed to use getenv('USERNAME'), but if i put it on my web page returns a empty string (http://rigo.ro/docs/test.php), if I acces the page from the localhost it returns the name of my pc. Is there any way that I can get the name of a user logged on a windows OS? (any script is ok php/javascript....) Thanks Link to comment https://forums.phpfreaks.com/topic/156435-get-current-user-name/ Share on other sites More sharing options...
revraz Posted May 1, 2009 Share Posted May 1, 2009 http://www.google.com/search?q=php+get+username Link to comment https://forums.phpfreaks.com/topic/156435-get-current-user-name/#findComment-823672 Share on other sites More sharing options...
the182guy Posted May 1, 2009 Share Posted May 1, 2009 Not without some sort of nasty ActiveX control or Java applet or similar. The function you use returns the user that the webserver is running on. Link to comment https://forums.phpfreaks.com/topic/156435-get-current-user-name/#findComment-823676 Share on other sites More sharing options...
Gighalen Posted May 1, 2009 Share Posted May 1, 2009 evolt.org highest rated article. Link to comment https://forums.phpfreaks.com/topic/156435-get-current-user-name/#findComment-823695 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.