//cgaction if (structKeyExists(url, "cgaction")) { cgaction = url.cgaction; } else if (structKeyExists(form, "cgaction")) { cgaction = form.cgaction; } else if (structKeyExists(request, "cgaction")) { cgaction = request.cgaction; } else { cgaction = ''; } memberDAO = CreateObject("component", "components.nhea.memberDAO").init(application.dsn); errMsg = '';

Sign-up to Become a Member

#errMsg#

//check if email address already exists if (memberDAO.emailExists(form.email)) { errMsg = 'The email address you provided already exists in our system.

' & 'If you forgot your password, please click on the "Forgot my password" ' & 'link on the login page. Otherwise, please go back and enter a different ' & 'email address. '; return; } //add member to temporary database member = CreateObject("component", "components.nhea.member").init( email = form.email, password = form.password, fname = form.firstName, mInitial = form.middleInitial, lname = form.lastName, address = form.address, city = form.city, state = form.state, zip = form.zipcode, homePhone = form.phone, numEmployees = form.numberofEmployees, employeeTypes = form.employee_Type, employeeTypes_Other = form.other_EmployeeType, gtmPayroll = form.currently_Use_GTM); result = memberDAO.addToTemp(member); if (not result.status) { errMsg = 'There was a problem during the signup process. Please try again or ' & 'contact the system administrator.'; return; } //extract phone flds if (left(form.phone, 1) eq '(') { phone_a = Mid(form.phone, 2, 3); phone_b = Mid(form.phone, 6, 3); } else { phone_a = Left(form.phone, 3); phone_b = Mid(form.phone, 5, 3); } phone_c = Right(form.phone, 4);
//check if member ID is valid tMember = memberDAO.getMemberByID(form.memberID); if (tMember.getMemberID() eq 0) { errMsg = 'The membership number you provided does not exist.

' & 'Please go back and make sure the membership number is correct. '; return; } //add member to temporary database member = CreateObject("component", "components.nhea.member").init( memberID = form.memberID, fname = form.firstName, mInitial = form.middleInitial, lname = form.lastName, address = form.address, city = form.city, state = form.state, zip = form.zipcode, homePhone = form.phone, numEmployees = form.numberofEmployees, employeeTypes = form.employee_Type, employeeTypes_Other = form.other_EmployeeType, gtmPayroll = form.currently_Use_GTM); result = memberDAO.addToTemp(member, 'Renew'); if (not result.status) { errMsg = result.msg; //errMsg = 'There was a problem during the renewal process. Please try again or ' & // 'contact the system administrator.'; return; } //extract phone flds if (left(form.phone, 1) eq '(') { phone_a = Mid(form.phone, 2, 3); phone_b = Mid(form.phone, 6, 3); } else { phone_a = Left(form.phone, 3); phone_b = Mid(form.phone, 5, 3); } phone_c = Right(form.phone, 4);