<% Option Explicit on error resume next 'Response.Write(Application("Connect")) 'Response.End Session("InsuredID") = "" dim LoginName dim LoginPassword dim RemoteIP LoginName = trim(Request("txtUsername")) LoginPassword = trim(Request("txtPassword")) RemoteIP = trim(Request.ServerVariables("REMOTE_ADDR")) if (LoginName <> "") and (LoginPassword <> "") then dim adoCn dim adoCm dim adoRs ' Response.Write("

Logon User: " & Request.ServerVariables("LOGON_USER") & "

") ' Response.Write("

Logon Name: " & LoginName & "

") ' Response.Write("

Logon Pass: " & LoginPassword & "

") set adoCn = Server.CreateObject("ADODB.Connection") adoCn.Open Application("Connect") ' Response.Write("

Connected

") set adoCm = Server.CreateObject("ADODB.Command") set adoCm.ActiveConnection = adoCn adoCm.CommandText = "spWWWLogin" adoCm.CommandType = 4 adoCm.CommandTimeout = 15 adoCm.Parameters.Append adoCm.CreateParameter("LoginName", 200, , 255) adoCm.Parameters.Append adoCm.CreateParameter("LoginPassword", 200, , 255) adoCm.Parameters.Append adoCm.CreateParameter("RemoteIP", 200, , 255) adoCm("LoginName") = LoginName adoCm("LoginPassword") = LoginPassword adoCm("RemoteIP") = RemoteIP set adoRs = Server.CreateObject("ADODB.Recordset") set adoRs = adoCm.Execute ' Response.Write("

Stored Proc Open

") dim StatusID StatusID = 0 if not adoRs.EOF then if not isnull(adoRs("InsuredID")) then Session("InsuredID") = trim(adoRs("InsuredID")) if not isnull(adoRs("RegistrationStatusID")) then StatusID = adoRs("RegistrationStatusID") end if adoRs.Close set adoRs = Nothing set adoCm = Nothing adoCn.Close set adoCn = Nothing ' Response.End if Session("InsuredID") = "" then ' Response.Write("

" & Application("Connect") & "

") Response.Redirect("invalid.asp") Response.End end if select case StatusID case 1 Session("InsuredID") = "" Response.Redirect("verify.asp") Response.End case 2 Response.Redirect("account.asp") Response.End case 3 Session("InsuredID") = "" Response.Redirect("inactive.asp") Response.End case 4 Session("InsuredID") = "" Response.Redirect("locked.asp") Response.End case else Session("InsuredID") = "" Response.Redirect("invalid.asp") Response.End end select else LoginName = trim(Request("txtUsername")) LoginPassword = "" end if %> Member Login

AAFP Member Login

We apologize for the inconvenience but we are in the process of upgading this feature on our website so it is currently unavailable.

If you need assistance please call Customer Care at 1-800-325-8166. Thank you.

Home Page