Solved

Send Windows 2k/xp UserID to MySql table using PHP/CGI

Posted on 2006-06-10
2
225 Views
Last Modified: 2013-12-25
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.


0
Comment
Question by:msammis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 250 total points
ID: 16878224
> %USERNAME%
you do not mean %USERNAME% from the client, do you?
impossible (or you need to install malware on the client)
0
 

Author Comment

by:msammis
ID: 17115474
Answer: The user name from the Windows Login.

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.Network")
var username = (Network.UserName)
var computername = (Network.ComputerName)
document.{HTMLFormName}.{BranchEmp_Name}.value=(username);
document.{HTMLFormName}.{Branch_PCName_Name}.value=(computername); }
</script>
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to dynamically set the form action using jQuery.

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question