Jump to content


Photo

How do you display who you are signed in as?


  • Please log in to reply
2 replies to this topic

#1 luke

luke
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 27 September 2003 - 10:38 PM

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

#2 luke

luke
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 27 September 2003 - 11:07 PM

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

#3 thefisherman

thefisherman
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 01 February 2004 - 02:08 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users