On the page that processes your login, you just need to set the session variable to the desired value. The format is Session("<key string>") = <value>
Session("sUserPassword") = sPassword
Then on the pages that need to use it, you just call it like this:
sPassword = Session("sUserPassword")
If the value doesnt exist (i.e., your user hasn't logged in) the value will be blank.
sPassword = Session("sUserPassword")
If sPassword <> "" Then
'Do what you need for a logged in user
Else
'Handle non logged in user.
End If
Peter
------------------------------------------------------
Work smarter, not harder.
|