Current user’s machine name
While looking in the PHP predefined variables i found an intersting one: $_ENV["COMPUTERNAME"]. what this does is it gives the current username of the person viewing your site. This is quite good if you are making a poll for a intranet where each user has their own username.
Have a look at this and tell me what you think.
PHP:
-
$username = $_ENV["COMPUTERNAME"]; //set variable
-
?>
I hope somebody finds it helpful.













Does not work.
I like this post. It’s more along the lines of the stuff that I write about on my blog.
Thank you, and what didn’t work??
can I see your code?