Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/06/2003, 02:35
AZP
 
Fecha de Ingreso: junio-2003
Mensajes: 83
Antigüedad: 21 años, 11 meses
Puntos: 0
Problema con Login e Identificador Querystring

Amigos,

¿Qué problema hay en este código? El código me loguea bien; no obstante, cuando me debe redirigir a la página contestar.asp?idmensaje="&IdMensaje&" me da error 404 (página no encontrada) -y existir existe-.

Página password.asp

<%IdMensaje = Request.QueryString("IdMensaje")%>

<%
Response.Expires = -1000
Response.Buffer = True
Session("UserLoggedIn") = ""
If Request.Form("login") = "true" Then
CheckLogin
Else
ShowLogin
End If

Sub ShowLogin
%>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" id="AutoNumber1">
<form name=form1 action=password.asp?idmensaje=<%= IdMensaje%>>
<input type=hidden name=login value=true>
<tr>
<td width="40%"><p class="posted">Username</td>
<td width="60%"><input type=text name=username size="15" class="b"></td>
</tr>
<tr>
<td width="40%"><p class="posted">Password</td>
<td width="60%"><input type=password name=userpwd size="15" class="b"></td>
</tr>
<tr>
<td width="40%"></td>
<td width="60%"><input type=submit value="Login" name="a" class="a"></td>
</tr>
</form>
</table>

<%

End Sub

Sub CheckLogin
If LCase(Request.Form("username")) = "BLABLA" And LCase(Request.Form("userpwd")) = "BLABLA" Then
Session("UserLoggedIn") = "true"
response.redirect("contestar.asp?idmensaje="&IdMen saje&" ")
Else
Response.Write("Password erróneo.<br><br>")
Response.Redirect("foro.asp")
ShowLogin
End If
End Sub
%>

En la página contestar.asp pongo en la parte superior:

<%IdMensaje=Request.QueryString("IdMensaje")%>
<%
Response.Expires = -1000
Response.Buffer = True

If Session("UserLoggedIn") <> "true" Then
Response.Redirect("foro.asp")
End If
%>

Gracias por todo,

AZP