hola de nuevo, ya hice lo que Adler me dijo pero no me sale :S espero me puedan ayudar
me sigue diciendo que el password no es correcto aqui les dejo el codigo...
Código asp:
Ver original<html>
<head>
<title></title>
<style type="text/css">
<!--
.style1 {
color: #000066;
font-weight: bold;
font-family: Cambria;
font-size: 20px;
}
.style2 {font-size: 18px}
-->
</style>
</head>
<!--#include Virtual ="Reservaciones\connsql.asp"-->
<body topmargin="0" leftmargin="0">
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center" class="style1 style2"><big>Autentificando ...</big></p>
<%
Usuario = Request.Form("usuario")
ClaveUsuario = Request.Form("password")
%>
<script Language="VbScript">
Usuario = "<% =Usuario %>"
password = "<% =ClaveUsuario%>"
msgbox Usuario
msgbox password
</script>
<%
sql = "SELECT * FROM usuarios WHERE usuario= '"& Usuario &"'and password='"&Password&"';"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn
if not rs.eof then
Response.Write "<p align='center'><strong><font color='#000066'>Registrado </font></strong></p>"
if rs.fields("permiso") = "usuario" then
%>
<script Language="VbScript">
usuario = "<% =usuario %>"
passw = "<% =contrasena %>"
<% rs.Close %>
ventana = window.open("reservacion.asp?usuario=" & usuario, "_self")
</script>
<%else%>
<script Language="VbScript">
usuario = "<% =usuario %>"
passw = "<% =contrasena %>"
<% rs.Close %>
ventana = window.open("administrador.asp?usuario=" & usuario, "_self")
</script>
<%
end if
else
Response.Write "<p align = 'center'><strong><font color='#000066'>Usuario o Password Incorrectos</strong></font></p>"
%>
<script Language="VbScript">
//Usuario = <% =Usuario %>
//msgbox usuario & " ¡Usuario no registrado!", vbCritical
a = window.open("index.asp?NumError=1&QueUsuario=" & Usuario, "_self")
</script>
<%
end if
%>
</body>
</html>