Tema: S.o.s
Ver Mensaje Individual
  #13 (permalink)  
Antiguo 02/09/2004, 16:09
yeye021
 
Fecha de Ingreso: septiembre-2004
Mensajes: 9
Antigüedad: 20 años, 8 meses
Puntos: 0
esta es la página del formulario

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Ventana del Administrador</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form1" method="post" action="ingreso.asp">
<table width="41%" border="0">
<tr>
<td width="35%"><div align="justify"><strong><font size="2" face="Verdana, Helvetica, Arial">LOGIN</font></strong></div></td>
<td width="65%"><input name="text2" type="text" id="text2"></td>
</tr>
<tr>
<td><div align="justify"><strong><font size="2" face="Verdana, Helvetica, Arial">PASSWORD</font></strong></div></td>
<td><input name="text3" type="password" id="text3"></td>
</tr>
</table>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;
<input type="submit" name="Submit" value="Aceptar">
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" name="Submit2" value="Cancelar">
</form>
</body>
</html>

y esta es mi página ingreso.asp

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<% Dim rs1, ObjADO
Dim sql
Set ObjADO=Server.CreateObject("ADODB.Connection")
Set rs1=Server.CreateObject("ADODB.Recordset")
ObjADO.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath ("/portalweb/bdatos/catedra.mdb")
txt2=request.form ("txt2")
txt3=request.form ("txt3")

sql="SELECT * From administrador WHERE txt2= '" & txt2 & "' AND txt3= '" & txt3 & "'"
rs1.Open sql, ObjADO,1,2
if rs1.eof then
response.write "Usuario No Permitido"
else
response.redirect "administrador1.asp"
end if
%>
<title>ingreso</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
</body>
</html>