So i am running this website on the intranet. It has a form and some data is filled out and then submitted. Now i also want to get the username of the user, so the user does not have to enter it. So far i tried $username = gethostbyaddr($_SERVER['REMOTE_ADDR]);. This works like a charm as it gives me the computer name of where the data came from. But different users can log into the machine, which is why this doesnt help.
To make it bit more clear on what has worked so far: ComputerA is running XAMPP server. I can connect to the website using ComputerB and when i submitted the data, my sql server has ComputerB as the username. Tried same with ComputerC and it showed ComputerC as well.
What i am looking for is how C:\Users\(name)\Desktop. I want to know what that name is? Also, if you guys can tell me something better which can be unique, that is fine as well. It doesnt have to be the name.