This topic is locked

Storing user name at login....

7/11/2008 14:19:44
ASPRunnerPro General questions
K
kerv21 author

I am using the shopping cart template and I am trying to store the user_name into a session variable in the BeforeLogin event...
[codebox]** Check if specific record exists ****

strSQLExists = "select * from Users where user_email='$username'"

set rsExists = CreateObject("ADODB.Recordset")

rsExists.Open strSQLExists, dbConnection
if not rsExists.eof then

' if record exists do something

Session("User_name") = rsExists("User_name")

end if

rsExists.Close : set rsExists = Nothing
BeforeLogin = True[/codebox]
Am I doing something wrong ? -- When I use the session variable "User_name" later it is empty.

K
kerv21 author 7/12/2008

Never mind... This has been resolved.