|
 |
asp_databases thread: password from database
Message #1 by FungHM <funghm@s...> on Tue, 09 Oct 2001 17:40:08 +0800
|
|
hi anyone, pls help..
the problem is how do i code the login function given the password can be
retrieve from database using ASP??
this might be the problem of my code.
if SESSION("status")=0 then
response.redirect "frames.asp"
end if
any idea of what could b the SESSION("status")=0 come from?
Message #2 by Sam Clohesy <sam@e...> on Tue, 9 Oct 2001 11:03:19 +0100
|
|
Like this:
set objRs = server.createobject("ADODB.Recordset")
strSql = "SELECT * FROM tblAdminLogin WHERE AdminLoginUsername = '" &
strAdminLoginUsername & "' AND AdminLoginPassword = '" &
strAdminLoginPassword & "'"
objRs.open strSql, myconn
'##Admin levels
Select Case (objrs("adminLoginLevel"))
Case 0:
Session ("Auth") = 0
case 1:
Session ("Auth") = 1
Case 2:
Session ("Auth") = 2
End select
Thanks
Sam
-----Original Message-----
From: FungHM [mailto:funghm@s...]
Sent: 09 October 2001 10:40
To: ASP Databases
Subject: [asp_databases] password from database
Importance: High
hi anyone, pls help..
the problem is how do i code the login function given the password can be
retrieve from database using ASP??
this might be the problem of my code.
if SESSION("status")=0 then
response.redirect "frames.asp"
end if
any idea of what could b the SESSION("status")=0 come from?
Message #3 by Steve Carter <Steve.Carter@t...> on Tue, 9 Oct 2001 11:54:28 +0100
|
|
You can assign values to session("whatever") and they will keep their values
from page to page,
so when you have completed your logon, you can go
session("status") = 1
to signify that the logon was successful.
> -----Original Message-----
> From: FungHM [mailto:funghm@s...]
> Sent: 09 October 2001 10:40
> To: ASP Databases
> Subject: [asp_databases] password from database
> Importance: High
>
>
> hi anyone, pls help..
>
> the problem is how do i code the login function given the
> password can be
> retrieve from database using ASP??
> this might be the problem of my code.
>
> if SESSION("status")=0 then
> response.redirect "frames.asp"
> end if
>
> any idea of what could b the SESSION("status")=0 come from?
Message #4 by "Tomm Matthis" <matthis@b...> on Tue, 9 Oct 2001 09:50:33 -0400
|
|
Somewhere in the code (probably the default page of the web app), it is
validating the username and password and if correct is setting the Session
variable status to 1, otherwise it is setting (or leaving it 0) to keep
non-logged-in users from accessing the page.
Hope that helps.
-- Tomm
> -----Original Message-----
> From: FungHM [mailto:funghm@s...]
> Sent: Tuesday, October 09, 2001 5:40 AM
> To: ASP Databases
> Subject: [asp_databases] password from database
> Importance: High
>
>
> hi anyone, pls help..
>
> the problem is how do i code the login function given the password can be
> retrieve from database using ASP??
> this might be the problem of my code.
>
> if SESSION("status")=0 then
> response.redirect "frames.asp"
> end if
>
> any idea of what could b the SESSION("status")=0 come from?
>
>
>
>
> $subst('Email.Unsub')
>
>
Message #5 by FungHM <funghm@s...> on Wed, 10 Oct 2001 10:43:18 +0800
|
|
Message #6 by FungHM <funghm@s...> on Wed, 10 Oct 2001 10:51:35 +0800
|
|
|
|
 |