Tengo este script para una paginita de logeo, el inconveniente es que no me puedo logear con más de un usuario siempre toma nada más que uno me podrían ayudar?
Gracias.
Código ASP:
Ver original
function stripQuotes(strWords) stripQuotes = replace(strWords, "'", "''") end function function sanitize(strWords) dim badChars dim newChars badChars = array("select", "drop", ";", "--", "insert", "delete", "xp_", "#", "%", "&", "'", ";", "=", "?", "`", "|") newChars = strWords for i = 0 to uBound(badChars) newChars = replace(newChars, badChars(i) , "") next sanitize = newChars end function if Request.ServerVariables("REQUEST_METHOD") = "POST" Then strUser = sanitize( request.form("user") ) strPass = sanitize( request.Form("pass") ) strSQL = "SELECT * FROM T_USERS" Set Rs = Server.CreateObject("ADODB.Recordset") Rs.ActiveConnection = strConn Rs.Source = strSQL Rs.CursorType = 2 Rs.CursorLocation = 2 Rs.LockType = 1 Rs.Open() Rs.MoveFirst While Not Rs.EOF if strUser = rs("usuario") AND strPass = rs("contrasena") Then userFound = 1 theUser = rs("usuario") else userFound = 0 End if Rs.MoveNext Wend Rs.close() set Rs = nothing if userFound = 1 Then Session("adminLogged") = true Session("usuario") = theUser response.Redirect("./?") else response.Redirect("login.asp?error=nouser") end if else