echo current user with PHP
I want my website to display, via echo the currently logged on user. So for example if someone logs with the username John, on the following page I would like to echo "Hello John". I know this is possible with cookies but it seems insecure, is there an easier way.
Thanks for the help guys
Also, I should post this in a different post really but is it possible to use a similar command to display all users currently logged onto the website (obviously this ability would only be give to a root user who will have higher level abilities than standard clients).
|