ASP Login
Hejsa alle jer derude !!! nu hgar jeg bøvlede med mit asp system og jeg er nybegynder her er min kode fortæl mig hvad jeg harn gjort fejl ved :<%
SET rs = Server.CreateObject(\"ADODB.Connection\")
rs.Open \"Driver={Microsoft Access Driver (*.mdb)}; DBQ=\" & Server.MapPath(\"DB.mdb\")
If Request(\"mode\") = \"Check\" then
Sql = \"Select Count(*) as Found from users where (username = \'\" & Request(\"username\") & \"\') and (password =\'\" & Request(\"password\") & \"\')\"
Set Login = Rs.Execute(Sql)
if Login(\"Found\") = 0 then
Session(\"login\") = 0
error = \"FEJL: DENNE BRUGER HAR IKKE ADGANG TIL SIDEN!!!\"
else
Session(\"Login\") = 1
Session(\"password-session\") = Request(\"username\")
Response.Redirect \"test.asp\"
end if
else
end if
%>
<html>
<head>
<meta http-equiv=\"Content-Language\" content=\"da\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">
<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 4.0\">
<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">
<title></title>
</head>
<body bgcolor=\"#000080\" text=\"#FFFFFF\" link=\"#FFFFFF\" vlink=\"#FFFFFF\" alink=\"#FFFFFF\">
<form method=\"POST\" action=\"--WEBBOT-SELF--\">
<!--webbot bot=\"SaveResults\" startspan U-File=\"_private/form_results.txt\"
S-Format=\"TEXT/CSV\" S-Label-Fields=\"TRUE\" --><input TYPE=\"hidden\" NAME=\"VTI-GROUP\" VALUE=\"0\"><!--webbot
bot=\"SaveResults\" endspan -->
<p><input type=\"text\" name=\"Brugernavn\" size=\"20\" value=\"Brugernavn\" id=\"Brugernavn\">
<b>Kode:<input type=\"password\" name=\"Kode\" size=\"20\" id=\"Kode\"></b></p>
<p>
<a href=\"test.asp\">
<input type=\"button\" value=\"Login\" name=\"Login\" id=\"Login\"></a></p>
</form>
</body>
</html>
