Har denna kod:
<%If Request.QueryString("do") = "login" Then
strEmail = Trim(Request.Form("email"))
strPassword = Trim(Request.Form("pass"))
If Not strEmail = "" Then
Set RS=Conn.Execute("Select * From users Where email='" & strEmail & "'")
If Not RS.EOF Then
If strPassword = RS("Pass") Then
Set Block=Conn.Execute("Select * From blockade Where userId=" & RS("userId"))
If Block.EOF Then
Session("userId") = RS("userId")
Session("userName") = RS("userName")
Session.TimeOut = 45
Conn.Execute("Update users Set status=true, statusin=Now, statustyp='Online' Where userId=" & RS("userId"))
RS.Close
Set RS = Nothing
Set Conn = Nothing
Response.Redirect "index.asp"
Else
Session("lay") = "0"
Response.Redirect "login.asp?mess=block"
End If
Else
Session("lay") = "0"
Response.Redirect "login.asp?mess=fel1"
End If
Else
Session("lay") = "0"
Response.Redirect "login.asp?mess=fel2"
End If
RS.Close
Set RS = Nothing
End If
Set Conn = Nothing
End If%>
<table width="<%=Width%>" bgcolor="<%=Farg1%>" cellpadding="2" cellspacing="1" align="center" border="1" style="border-collapse: collapse" bordercolor="#000000">
<form name="login" action="login.asp?do=login" method="post" onSubmit="return LoggaIn()">
<tr bgcolor="<%=Farg3%>">
<td colspan="6" style="border-bottom:1px solid black"><b>Logga in</b></td>
</tr>
<tr>
<td valign="top" colspan="6" align="center">
<table border="0" cellpadding="2" cellspacing="0" width="50%" height="1">
<tr>
<td width="13%"><b>Emailadress:</td>
<td width="87%"><input type="text" name="email" size="35"></td>
</tr>
<tr>
<td><b>Lösenord:</td>
<td><input type="password" name="pass" size="35"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Logga in" name="submit"></td>
</tr>
<tr height="10">
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td><a href="glomt.asp">Glömt lösenordet?</a></td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<%Conn.Close
Set Conn=Nothing%>
Många gånger kan man inte logga in. Nån som har aning vad det kan vara?!?