retain user rightsam 21.01.2008 18:51:44 von navin
i have created a login page for my intranet website. when user logs
in, it also check for the rights which the user has ("admin", "user").
what i want to acheive is that, once user log in, based on the type of
permission, they will be allowed to delete data dispplayed in the
I tried doing this by creating a session variable at the time of
logging in but when i try to retrieve this session variable, it does
not return anything.
Please help and let me know how can i retain the login information for
a user so that it can be used till user leaves the site. below is the
code from login page:
Set cnnSimple = Server.CreateObject("ADODB.Connection")
SQLstr="SELECT * FROM tblBuyers WHERE buyerUserName='" & userName & "'
AND buyerPassword='" & pwd & "';"
cnnSimple.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strDBPath & ";"
Set rstSimple = cnnSimple.Execute(SQLstr)
if rstSimple.EOF=True Then 'and (IsNull(userName)=True OR
Response.Write ("Login Not Found")
if valFound=True Then
In the below code i am trying to retrieve the session variable which
was created a login time which come shows blank:
If Session("UserRights") = "admin" Then
Display the link for admin
Display the link for user.