drdisk
|
Posted: 01/07/2002, 6:34 PM |
|
I am trying to display a Users first and last Name on page whenever they log in. Please Help
|
|
|
drdisk
|
Posted: 01/07/2002, 7:46 PM |
|
I add a couple of sessions to the login.asp form Session (FirstName) and Session (LastName)
Like This
Session("UserName") = CStr(DLookUp("users", "user_login", "user_login =" & ToSQL(sLogin, "Text") & " and user_password=" & ToSQL(sPassword, "Text")))
Session("FirstName") = CStr(DLookUp("users", "first_name", "user_login =" & ToSQL(sLogin, "Text") & " and user_password=" & ToSQL(sPassword, "Text")))
Session("LastName") = CStr(DLookUp("users", "last_name", "user_login =" & ToSQL
|
|
|
Nicole
|
Posted: 01/08/2002, 2:27 AM |
|
Hello,
you can display this information on the header page.
for ASP+Templates:
to the header section of one of the forms on header page add the code like:
<b>{name}</b>
in the Open event of the same form on the header page add the code like:
if Session("FirstName")<> "" and Session("LastName")<> "" then
SetVar "name", "Hello " & Session("FirstName") & " " & Session("LastName")
end if
for ASP:
to the header section of one of the forms on header page add the code like:
<b><%=name %></b>
in the Open event of the same form on the header page add the code like:
if Session("FirstName")<> "" and Session("LastName")<> "" then
name = "Hello " & Session("FirstName") & " " & Session("LastName")
end if
|
|
|
Anthony
|
Posted: 10/07/2002, 8:07 PM |
|
Could you please explain your solution. I am very interested.
|
|
|
|