Ver Mensaje Individual
  #11 (permalink)  
Antiguo 26/07/2004, 09:36
copine13
 
Fecha de Ingreso: abril-2004
Ubicación: zaragoza
Mensajes: 36
Antigüedad: 21 años
Puntos: 0
En realidad el problema estaba en otro codigo.Me equivoqué en las variables.
De todos modos os pongo en codigo.


Codigo del formulario

<html>
<head><title>Usuario</title>
</head>
<body bgcolor=#FCB230 background="foto/fondo.gif">

<table cellpadding="0" cellspacing="0" width="175" border="0" bgcolor="#D5E6FD" >
<form action=pruebausuario.asp method=post >
<tr><td rowspan="6"><img src="foto/pixel.gif" width="8" height="1" border="0"></td>
<td colspan="2"><img src="foto/pixel.gif" width="1" height="5" border="0"></td>
<td rowspan="6"><img src="foto/pixel.gif" width="8" height="1" border="0"></td>
<tr><td width="60%"><span class="negrita">Nombre usuario<span></td><td><input type="text" name="logina" maxlength="20" value="" size="7"></td></tr>
<tr><td valign="top"><table cellpadding="3" cellspacing="0"><tr><td><span class="negrita">Contraseña</span></td></tr></table></td><td><input type="password" name="password" maxlength="20" size="7">
</td></tr>
<tr><td valign="top"><a href="olvido.asp" class="footerlink"><font class="negritapeque">¿Has olvidado tu contraseña?</a></td><td><input type="image" src="foto/enviar.gif" width="52" height="24" border="0" name="Login" value="Logina" align="middle" alt="Enviar"></td></tr>
<input type='hidden' name='procedenciad' value='/Default.asp'>
<tr><td colspan="2"><img src="foto/pixel.gif" width="1" height="5" border="0"></td></tr></form>
</table>
</body>
</html>

Codigo de verificacion de datos


<%
Dim usuario, password
set conexion = Server.Createobject("adodb.connection")
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("amigos.mdb")
conexion.open strconn
If Request.Form("logina") = "" OR Request.Form("contraseña") = "" then
Response.Redirect "user.htm"
Else

usuario = Trim(Request.Form("logina"))
password = Trim(Request.Form("contraseña"))
usuario = Replace(usuario,"'","''")
password = Replace(password,"'","''")
autorizacion= true
sql= "select * from personass where nomAmigo='"&request.form("logina") &"'"

set RS= conexion.execute(sql)
If (RS.BOF AND RS.EOF) then

Response.Write "Ese usuario no existe"
ElseIf RS.Fields("contraseña") = password then

Response.Write "Te logueaste con exito... Bienvenido <B>"& usuario &"</B>"
Else
Response.Write "Esa contraseña no concuerda con el usuario ingresado"
End If


RS.Close

Set RS = Nothing

End If
%>


Saludos
__________________
bibiche