Ich versuche ja zur Zeit ein Login zu programmieren, habe aber noch meine
Problem, da ich noch nicht lange mit asp programmiere.

Das Anmeldeformular habe ich, genau so wie die speicherung in der Datenbank.
Funktioniert 100%

Ich habe zwar ein asp Datei (von einem fr�heren Asp Prog.). Diese habe ich
versucht umzuschreiben. Jetzt funktioniert sie nicht mehr und ich wei� nicht
wo der Fehler sein k�nnt.

Jetzt meine Frage: K�nnt ihr euch mal den Quellcode anschauen ob da evtl.
ein Fehler ist oder mir einen Tip geben ?? Habt ihr auch so etwas
programmiert ??
Schickt mir doch einfach einmal einen Beispiel Quellcode von euch. W�hre
echt super


Hier der Quellcode:


<%
Option Explicit
Dim sql,rsUser,nickname,passwort,page,LConnectString,lconn,sqlflag

'Grab the submitted variables (page is the page they've come from, set by
the hidden variable at the login box)
Nickname = Request.Form("Nickname")
Passwort = Request.Form("Passwort")
page = Request.Form("page")

if page = "" then
 page = "login.asp"
end if

'Check no s**t is trying to hack in using SQL commands
if InStr(nickname, "'") or InStr(nickname, """") or InStr(nickname, "=") or
InStr(passwort, "'") or InStr(passwort, """") or InStr(passwort, "=") then
 sqlflag = True
end if

'Open connection
%>
<!--#include file="conn.asp"-->
<%

'Get a recordset corresponding to the submitted username and password
sql = "SELECT Nickname FROM user WHERE Nickname = '" & nickname & "' AND
passwort = '" & passwort & "'"
Set rsUser = Server.CreateObject("ADODB.Recordset")
rsUser.Open sql, conn, 3, 3

'If there was a valid recordset there, then send them back to the page they
came from, with the username cookie set
If (not rsUser.BOF) and (not rsUser.EOF) and sqlflag <> True then
  Response.Cookies("nickname") = rsUser("nickname")
  'If the user wants to stay logged in all the time, then we'll set the
cookie with a far-away expiry date
  if stayloggedin = "yes" then
 Response.Cookies("nickname").expires = #1/1/2010#
  end if
  rsUser.close
  set rsUser = nothing
  conn.close
  set conn = nothing
  Response.Redirect(page)
end if

'Otherwise, display an invalid entry screen
rsUser.close
set rsUser = nothing
conn.close
set conn = nothing%>




| Oft Gefragtes: http://www.aspgerman.com/aspgerman/faq/
| [aspdebeginners] als [email protected] subscribed
| http://www.aspgerman.com/archiv/aspdebeginners/ = Listenarchiv
| Sie knnen sich unter folgender URL an- und abmelden:
| http://www.aspgerman.com/aspgerman/listen/anmelden/aspdebeginners.asp

Antwort per Email an