How do you display who you are signed in as?
Posted 27 September 2003 - 10:38 PM
Please help, you are my only hope, Luke
Posted 27 September 2003 - 11:07 PM
Posted 01 February 2004 - 02:08 PM
Sessions are probably very handy for this. I've been doing sessions handcoded, mixed with dreamweaver.
A session must start for every user connected to your server.
Every started session must continue on every page which needs it.
A user can be session_registered, and will stay alive until the session dies, which is either through logout or the user closes the browser window.
echo'ing the user (the variable) while the session is still alive, will print the user on-screen.
Ok, it's more PHP than anyhitng else, but it works for me.
session_start(); // This starts the session for the user.
$id=session_id(); // This stores the session_id to $id, could be handy.
session_register('user'); // Registers the user variable
$user=$someone; // Puts the user's (login)name into $user and tracks it during the session. The variable $someone could come from a form text field for instance.
Maybe this helps
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users