Forums

This topic is locked

Greeting Users with MM_username

Posted 01 Feb 2005 23:28:09
1
has voted
01 Feb 2005 23:28:09 Jeff Baranda posted:
Hope this question does not put anyone to sleep.

I want to greet my users by displaying their names in my main menu. I know I have their names in MM_username once they successfully login but dont know the command to display it... sad but true.

Any takers?

Thanks in advance!

Replies

Replied 02 Feb 2005 00:32:48
02 Feb 2005 00:32:48 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>I want to greet my users by displaying their names in my main menu. I know I have their names in MM_username once they successfully login but dont know the command to display it...<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

What <i>Server Model</i>? (PHP, ASP, .NET, CF, JSP)

Actually, <b>don't answer that</b>, reguardless what <i>Server Model</i>: in your <i>Data Bindings</i> panel, if MM_username doesn't show up already, <b>add a SESSION variable and name it "MM_username", then just drag that into your page(s).</b> Done.

<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 02 Feb 2005 10:51:45
02 Feb 2005 10:51:45 Vince Baker replied:
&lt;%=Session("MM_Username"%&gt; where you want the name to be displayed.

Regards
Vince

DMX Talkzone Manager

Visit my home: www.chez-vince.com
(Now completely CSS based and bye bye to all tables!)

VBScript | ASP | HTML | CSS | SQL | Oracle | Hosting
Replied 02 Feb 2005 14:21:09
02 Feb 2005 14:21:09 Simon Martin replied:
Something you <i>might</i> want to consider....
Depending on how you've got your database set up MM_username might not be what you wanna display to the user e.g. if username is an email address and you've also captured their first and last names (a bit like here on the Zone) or if username is not unique

So you could slightly edit the login behaviour, add into the SELECT the Primary Key and then set that value in your own Session variable, just remember to kill it off when logging out. With the PK at your disposal you can use that to filter your recordsets and return more info than just their username.

Live the life you love
Love the life you live

Simon

Reply to this topic