<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Option Explicit %> <% sPageTitle = "Forgot Password?" %> <%=sTitle%> <% dim m, email If Request.form("email") <> "" Then email = Request.Form("email") Else email = Request.QueryString("e") End If m =Request.QueryString("m") If Request.Form.Count > 1 OR Request.QueryString.Count > 0 Then If IsValidEmail(email) = True Then m = "" Else m = "Please enter a valid e-mail address." End If Else m = "Enter your registered e-mail address and your password will be sent to you." End If If m = "" Then dim p p = lookupPassword If p <> "" Then If Mail_Password(email, p) = True Then Response.Write("Your password has been sent.") End If Else m = "E-mail address not found. Please contact us or try again." enterEmail End If Else enterEmail End If %> <%private sub enterEmail%>
<% If m <> "" Then %> <% End If %>
<%=m%>
E-mail:    
<%end sub%> <% function lookupPassword dbopen cmd.CommandText = "spPasswordLookup" cmd.CommandType = 4 cmd.Parameters("@email").value = email set recordset = cmd.Execute If recordset.EOF Then lookupPassword = "" Else 'recordset.MoveFirst lookupPassword = recordset.fields(0) End If dbclose end function %>