Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

session in asp&informix

Status
Not open for further replies.

parames

MIS
Jun 26, 2000
71
MY

hi.. my codes about session is not working.. here's the code :

sql = "select * from user where username = '" & (username) & "'"
sql = sql & " and password = '" & (password) & "'"

Set RS1 = Server.CreateObject("ADODB.Connection")
RS1.open "DSN=test;UID=informix;PWD=informix"
Set RS = RS1.Execute(sql)

If RS.BOF And RS.EOF Then
Response.Redirect "loginfail.asp"
Else
session("design") = RS("designation")
if session("design") = "admin"
response.redirect "admin.asp"
else
response.redirect "user.asp"
end if
end if

if the RS("designation") value is admin.. it still go to the user.asp and not to admin.asp..
and i've tried this without using sessions, like
if RS("designation") = "admin" ...
but, it still doesn't work.. but, it works if i use microsoft access database.. but why cannot in informix..

please help..
thanks
rgds,
parames.s



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top