Jump to content

How do you display who you are signed in as?


Recommended Posts

Using dreamweaver mx and PHP I would like to be able to tell people they are signed in as **** what ever they signed in as. How do i call that information out of php to be displayed? Or to be used when they submit a recordset to track who is filling in the recordsets.

 

Please help, you are my only hope, Luke

Link to comment
Share on other sites

In Dreamweaver MX 2004 when you use their sign in feature they create a session variable called MM_Username that you can add to the bindings panel as a server behavior then you can drag it and drop it where ever you want it displayed.

 

Luke

Link to comment
Share on other sites

  • 4 months later...

Hi!

 

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.

 

Something like:

 

<?

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

 

Regards

 

thefisherman

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.