Forums
 This topic is locked 
             Display information from database
 Posted 15 May 2003  02:38:26 
  1 
     has   voted 
  15 May 2003  02:38:26 Christian Sen posted: 
 Does anybody know how I can retrieve the hole name for my users from my database upon successful login? I would really like to say Welcome... when my visitors successfully log in.
I allready have a field in the database called "name" after the username and password columns.
I use DWMX and Access..
Appreciate all help. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Sarre
Replies
 Replied 15 May 2003  11:13:04 
   15 May 2003  11:13:04 Lee Diggins replied: 
  Hi Sarre
If you are using the Login User server behaviour then the following should give you the results you're after.
Find the line line referring to the SQL statement, something like:
MM_rsUser.Source = "SELECT username, userpassword"
and change it to:
MM_rsUser.Source = "SELECT username, userpassword, userwholename"
The next step is to create a Session variable and insert the recordset value MM_rsUser("userwholename" to the Session variable.
 to the Session variable.
Find the following comment, again in the Login User behaviour code:
' username and password match - this is a valid user
beneath the comment add:
Session("UserWholeName" = MM_rsUser("userwholename"
 = MM_rsUser("userwholename"
The Session variable now contains the recordset value for the userwholename, which you can display on the page and any other page by:
Response.Write(Session("UserWholeName" )
)
I think that's about all.
Digga
Sharing Knowledge Saves Valuable Time!!!
  If you are using the Login User server behaviour then the following should give you the results you're after.
Find the line line referring to the SQL statement, something like:
MM_rsUser.Source = "SELECT username, userpassword"
and change it to:
MM_rsUser.Source = "SELECT username, userpassword, userwholename"
The next step is to create a Session variable and insert the recordset value MM_rsUser("userwholename"
 to the Session variable.
 to the Session variable.Find the following comment, again in the Login User behaviour code:
' username and password match - this is a valid user
beneath the comment add:
Session("UserWholeName"
 = MM_rsUser("userwholename"
 = MM_rsUser("userwholename"
The Session variable now contains the recordset value for the userwholename, which you can display on the page and any other page by:
Response.Write(Session("UserWholeName"
 )
)I think that's about all.
Digga
Sharing Knowledge Saves Valuable Time!!!
 Replied 16 May 2003  00:21:15 
   16 May 2003  00:21:15 Christian Sen replied: 
  Hi Digga!
As usual you came up with a solution.
Your tip worked like a charm..
Thanx a million! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Sarre
  As usual you came up with a solution.
Your tip worked like a charm..
Thanx a million! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Sarre
 Replied 16 May 2003  00:32:06 
   16 May 2003  00:32:06 Lee Diggins replied: 
  You're welcome!
Digga
Sharing Knowledge Saves Valuable Time!!!
  Digga
Sharing Knowledge Saves Valuable Time!!!
