<% Set databaseConnection = getDatabaseConnection() formFields = Array("email") errorMessage = "" // set up a dictionary for form info Set formInfo = CreateObject("Scripting.Dictionary") // set defaults if just entering the form For Each fieldName In formFields fieldValue = "" formInfo.Add fieldName, fieldValue Next // if the user has submitted the form If Request("command") = "Retrieve Password" Then // get form info For Each fieldName In formFields fieldValue = CStr(Request.Form(fieldName)) formInfo.Item(fieldName) = fieldValue Next // validate required fields errorMessage = ternaryOperator((formInfo.Item("email") = ""), errorMessage & "Please provide your email so that we may send your password.
", errorMessage) If errorMessage = "" Then userEmail = CStr(formInfo.Item("email")) // get name and password from db Set userRecordRS = createRecordSet("SELECT TOP 1 hon_use_name, hon_use_password FROM hon_use_users WHERE hon_use_email = '" & safeDBEncode(userEmail) & "'", databaseConnection) If userRecordRS.EOF Then errorMessage = errorMessage & "The email address '" & formInfo.Item("hon_use_email") & "' was not found in our database.
If you mistyped your address, please correct the form and resubmit.
If you have not yet registered, you may do so here." Else userName = CStr(userRecordRS.Fields("hon_use_name")) userPassword = CStr(userRecordRS.Fields("hon_use_password")) End If destroyRecordSet(userRecordRS) If errorMessage = "" Then message = userName & "," & VbCrLf & VbCrLf & _ "Recently you requested that we send you your HACK or NOT password. According to our records " & _ "your password is:" & VbCrLf & VbCrLf & _ userPassword & VbCrLf & VbCrLf & _ "Thanks for using HACK or NOT! You can now access all the member benefits by logging in with " & _ "this email address and the password above." & VbCrLf & VbCrLf & _ "Login to HACK or NOT at http://www.jjjwebdevelopment.com/306sites/hackornot/login.asp" Call sendEmail(userName, userEmail, "HACK or NOT", "hackornot@jjjwebdevelopment.com", "Your HACK or NOT Information", message) // now set the success session and send to success page Session("success") = "password" Response.Redirect("success.asp") End If End If End If destroyConnection(databaseConnection) %> Forgot Your HACK or NOT Password?

Retrieve Password



So you forgot your password, eh? Not to worry, if you provide your email address in the form below, we'll send it to you. Thanks for using HACK or NOT!

<% If errorMessage <> "" Then %> <%= errorMessage %>
<% End If %>
<%= getCPMBanner() %>

Registered Email Address: " size="30" maxlength="256">



<%= getRightBarAd() %>