% validpwd = true If request.form("submit") <> "" Then ' setup variables userid = Request.Form("userid") passwd = Request.Form("passwd") Set conn = Server.CreateObject("ADODB.Connection") conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("../db/edificios.mdb") & ";" Set rs = conn.Execute( "Select * from [Adm] where [Usuario] = '" & UCASE(userid) & "'") If not rs.eof then If ucase(rs("Password")) = ucase(passwd) Then validpwd = true Else validpwd = false End If Else validpwd = false end if rs.Close Set rs=Nothing conn.Close Set conn=Nothing If validpwd Then Session("status") = "login" response.redirect "default.asp" End If End If %>
Usuario o Password incorrectos, vuelva a intentarlo
<% End If %>