Question
Login Problem
I have a login page where users enter a password which is a
combination of the last for digits of their ssn and their 4 digit
birth year. for example (43211971).
I am using this query to make the check:
<cfquery name="validatemanager" datasource="SelfNom">
SELECT * FROM tblEmployeeList3
WHERE EmployeeNo = #Form.HREmpNo#
AND right(SSNLast4, 4) = left(#form.HRSSNo#, 4)
AND BirthYear = Right(#form.HRSSNo#, 4)
</cfquery>
My problem is when someone has a last 4 digit ssn that begins with a 0 or two, the query fails the the user gets flagged with an invalid password.
How do I account for missing 0's when they arise?
I am using this query to make the check:
<cfquery name="validatemanager" datasource="SelfNom">
SELECT * FROM tblEmployeeList3
WHERE EmployeeNo = #Form.HREmpNo#
AND right(SSNLast4, 4) = left(#form.HRSSNo#, 4)
AND BirthYear = Right(#form.HRSSNo#, 4)
</cfquery>
My problem is when someone has a last 4 digit ssn that begins with a 0 or two, the query fails the the user gets flagged with an invalid password.
How do I account for missing 0's when they arise?
