• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Show if user if user is logged in. Without ADDT.

Participant ,
Apr 09, 2009 Apr 09, 2009

Copy link to clipboard

Copied

Hi,

I am trying to get Dreamweaver CS3 or CS4 to show the username of someone that is logged in.

For example:

Welcome (username)

or

You are currently logged in as (username)

Is there any easy way to do this without using ADDT. If someone can help I will be eternaly grateful.

Thanks,

cwhazzoo

TOPICS
Server side applications

Views

706

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 10, 2009 Apr 10, 2009

Copy link to clipboard

Copied

You don't say which server model you're using, but in PHP/MySQL, Dreamweaver creates a session variable called $_SESSION['MM_Username']. You can use this in any page that uses sessions to display the username. You can also use it to create a recordset that contains other details associated with the user. To do so, set the Filter in the Recordset dialog box to use a Session Variable and enter MM_Username in the field alongside, like this:

get_user_details.jpg

You can then use the results of the recordset to create a new session variable that contains the user's full name like this:

$_SESSION['fullName'] = $row_getUserDetails['first_name'] . ' ' . $row_getUserDetails['family_name'];

Since session variables are automatically available in all pages that use sessions (such as pages that use the Restrict Access to Page server behavior), you need create this recordset only once.

ASP and ColdFusion also support sessions, so the basic principle will be the same.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 10, 2009 Apr 10, 2009

Copy link to clipboard

Copied

Thanks. And yes I am using PHP/MySql.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 29, 2009 Apr 29, 2009

Copy link to clipboard

Copied

LATEST

The question is already answered in other thread. Please mark this thread also answered.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines