Help with login asp

  • Thread starter Thread starter Paul M
  • Start date Start date
P

Paul M

Hi
The following script is used to check if someone is logged in before
proceeding which works fine. What I want to do for a few admin pages is
only proceed if a certain login has occurred i.e.. one of the admin team.
Can anyone help
Paul M

<%
'First we check to see if the user is logged in
IF Session("Pass_word") = "" THEN
'If their session is empty then we create a session for the current URL they
were requesting
Session("ORI_URL") = Request.ServerVariables("Path_Info")
'Then we redirect them to the login page
Response.Redirect("logon.asp")
Else
End IF
%>
 
Hi Paul,
this should be easy but we'd need to know how you identify the admin team -
by username? Also we'd need to see the logon form itself, assuming you
indentify admins by user name you'd need to stick the username into a
session var. If you identify admins by password (I realise unlikely
scenario) you can just do
<%
'First we check to see if the user is logged in
IF Session("Pass_word") <> "AdminPassword" THEN
'If their session is empty then we create a session for the current URL they
were requesting
Session("ORI_URL") = Request.ServerVariables("Path_Info")
'Then we redirect them to the login page
Response.Redirect("logon.asp")
Else
End IF
%>
 
Back
Top