<% Select Case Request.QueryString("action") Case "login" Dim myUser If Len(Trim(SafeSQL(Request.Form("UserName")))) = 0 Or Len(Trim(SafeSQL(Request.Form("Password")))) = 0 Then Response.Redirect("login.asp?error=true") End If Set myUser = myConnection.Execute("SELECT * FROM Users WHERE " & _ "UserName='" & SafeSQL(Request.Form("UserName")) & "' AND " & _ "Password='" & SafeSQL(Request.Form("Password")) & "'") If Not myUser.EOF Then If CBool(myUser("IsParent")) = False Then Session("IsAdmin") = True End If Session("IsParent") = True Response.Redirect("admin_pages.asp") Else Session("IsAdmin") = False Session("IsParent") = False Response.Redirect("login.asp?error=true") End If myUser.Close Set myUser = Nothing Case "logout" Session("IsAdmin") = False Session("IsParent") = False Response.Redirect("login.asp") Case Else If Session("IsAdmin") = True Then Response.Redirect("admin_pages.asp") End If End Select %> Förskolan Kalinan

Logga in


<% If Request.QueryString("error") = "true" Then %>
Användarnamnet eller lösenordet är felaktigt.
Var vänlig försök igen.
<% End If %>
Användarnamn
Lösenord