Crash1hd
05-21-2003, 09:40 AM
Ok The following code doesnt seem to let me go to page 2 when valed email is given
<% Sub PReset() '''''''''''''''''''''''''''''''''' %>
<head><title>Password Reset Page</title></head>
<body>
<% Call ConfirmEmail()%>
<form name="PReset" action="Login.asp?PReset=1" method="post">
<input type="hidden" name="submitnumber" value="<% = submitnumber %>" />
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="28%"> </td>
<td width="42%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" colspan="2"><P Class=Text><b>Enter email address below<br />Your password will be reset and emailed to you</b></p></td>
</tr>
<tr>
<td width="100%" colspan="2"> </td>
</tr>
<tr>
<td width="50%"><p align=right>Email Address:</p></td>
<td width="50%"><input id="email" maxlength="100" size="23" name="email" value="<% = Server.HTMLEncode(email) %>"></td>
</tr>
<tr>
<td width="100%" align="center" colspan="2"><% If submitnumber > 1 AND ValidEmail(email) = False Then Response.Write("<span style=""color:#cc0000""> * Invalid Email Address * </span>")%><% If emailfound = False Then Response.Write("<span style=""color:#cc0000""> * Your email address was not found in our members database. * </span>")%></td>
</tr>
</table>
</td>
<td width="34%"> </td>
</tr>
<tr>
<td width="28%"> </td>
<td width="42%" align="center"><br /><input type="submit" value="Submit" /><br /><br /><a href="mailto:ResetPassword@lycosidea.com">Forgotten your Email Address</a></td>
<td width="34%"> </td>
</tr>
</table>
</form>
</body>
<% End Sub ''''''''''''''''''''''''''''''''''''''' %>
<%
Sub ConfirmEmail() ''''''''''''''''''''''''''''
Dim ConfirmQuery
ConfirmQuery = "SELECT email FROM members WHERE email = '" & SQLFormat(email) & "'"
Set RS = Conn.Execute(ConfirmQuery)
If RS.EOF = true then
emailfound = False ' The email was not found, they still need to register
Else
If NOT rs.EOF Then
Response.Redirect("Login.asp?Preset=2")
End If
End If
End Sub ''''''''''''''''''''''''''''''''''''''''''
%>
<% Sub PReset() '''''''''''''''''''''''''''''''''' %>
<head><title>Password Reset Page</title></head>
<body>
<% Call ConfirmEmail()%>
<form name="PReset" action="Login.asp?PReset=1" method="post">
<input type="hidden" name="submitnumber" value="<% = submitnumber %>" />
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="28%"> </td>
<td width="42%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" colspan="2"><P Class=Text><b>Enter email address below<br />Your password will be reset and emailed to you</b></p></td>
</tr>
<tr>
<td width="100%" colspan="2"> </td>
</tr>
<tr>
<td width="50%"><p align=right>Email Address:</p></td>
<td width="50%"><input id="email" maxlength="100" size="23" name="email" value="<% = Server.HTMLEncode(email) %>"></td>
</tr>
<tr>
<td width="100%" align="center" colspan="2"><% If submitnumber > 1 AND ValidEmail(email) = False Then Response.Write("<span style=""color:#cc0000""> * Invalid Email Address * </span>")%><% If emailfound = False Then Response.Write("<span style=""color:#cc0000""> * Your email address was not found in our members database. * </span>")%></td>
</tr>
</table>
</td>
<td width="34%"> </td>
</tr>
<tr>
<td width="28%"> </td>
<td width="42%" align="center"><br /><input type="submit" value="Submit" /><br /><br /><a href="mailto:ResetPassword@lycosidea.com">Forgotten your Email Address</a></td>
<td width="34%"> </td>
</tr>
</table>
</form>
</body>
<% End Sub ''''''''''''''''''''''''''''''''''''''' %>
<%
Sub ConfirmEmail() ''''''''''''''''''''''''''''
Dim ConfirmQuery
ConfirmQuery = "SELECT email FROM members WHERE email = '" & SQLFormat(email) & "'"
Set RS = Conn.Execute(ConfirmQuery)
If RS.EOF = true then
emailfound = False ' The email was not found, they still need to register
Else
If NOT rs.EOF Then
Response.Redirect("Login.asp?Preset=2")
End If
End If
End Sub ''''''''''''''''''''''''''''''''''''''''''
%>