Posted by K. A. on 02/02/08 09:25
I know it is not possible to get Windows login name using PHP because
it is a server-side script, but I dunno whether anyone has tried using
JavaScript in conjuction with PHP to capture the login name and save
it as a php variable.
Here is the JScript I used to capture the windows login name:
<head>
<script language="JScript">
var strUsername;
var objNetwork;
objNetwork= new ActiveXObject("WScript.Network");
strUsername= objNetwork.Username;
strUsername= strUsername.toLowerCase();
document.write(strUsername); // prints the login name onto the screen.
</script>
</head>
But how can I take the "strUsername" from here and save it as a PHP
variable for later use?
Any ideas? Please let me know...
Khalid
[Back to original message]
|