This topic is locked

Is there a way to auto insert the username into a field

2/24/2008 2:57:04 PM
PHPRunner General questions
R
rgman author

Is there a function similar to now() but that will automatically insert the username in to a text field. I need to know which user added a comment in a message area I have on the website. Is there a way to use a $_SESSION[userid] function ?
Thanks for any help.

J
Jane 2/26/2008

Hi,
username of logged user is stored in the $_SESSION["UserID"] variable.