<% 'Save the entered username and password EmailAddress = Request.Form("EmailAddress") Password = Request.Form("Password")
SQL = "SELECT * FROM person where EmailAddress='"& EmailAddress &"'" Set rs = objConn.Execute(SQL)
'If there is no record with the entered username, close connection 'and go back to login with QueryString If rs.recordcount = 0 then objConn.close set rs = Nothing set objConn = Nothing Response.Redirect "index.asp?login=passfailed" end if
'If entered password is right, close connection and open mainpage if rs("Password") = Password then Session("Name") = rs("Name") objConn.Close set rs = Nothing set objConn = Nothing Response.Redirect "medlemmer/default.asp" Else 'If entered password is wrong, close connection 'and return to login with QueryString If rs("Password") = "" Then objConn.Close Set objConn = Nothing Response.Redirect "index.asp?login=passfailed" end if End if %>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.