msammis
asked on
Send Windows 2k/xp UserID to MySql table using PHP/CGI
Server:
Apache with PHP/MYSQL on Novell 6.5 Server.
Question:
I am creating a page that will require an identification for tracking and auditing purposes.
In Php page (hidden tex box), I want to retrieve get value %USERNAME%. I have not succeeded with
Javascript or any other method yet. This username is the LOGGED In user of a windows workstation.
You can type set at the command prompt to see the information I need.
Possible using PHP or CGI ? I am not trained well enough in either of these.
Apache with PHP/MYSQL on Novell 6.5 Server.
Question:
I am creating a page that will require an identification for tracking and auditing purposes.
In Php page (hidden tex box), I want to retrieve get value %USERNAME%. I have not succeeded with
Javascript or any other method yet. This username is the LOGGED In user of a windows workstation.
You can type set at the command prompt to see the information I need.
Possible using PHP or CGI ? I am not trained well enough in either of these.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I ended up using this script in an .hta page and it works well. The normal box that warns you does not appear
because of using the .hta.
</script>
<script language="JavaScript">
function username() {
var Network = new ActiveXObject("WScript.Net
var username = (Network.UserName)
var computername = (Network.ComputerName)
document.{HTMLFormName}.{B
document.{HTMLFormName}.{B
</script>