I want to create an administrative area for an Intranet for my Human Resources Department.
I have a table in a database which consists of ACCESS_LEVEL, USERNAME and PASSWORD.
I have a log in page where a HR user enters their Username and Password. If the enter these correctly they go to loginOK.cfm, and if they don't they go to loginFail.cfm.
Here's the question...
When they first enter their password and username, how can I then set a cookie to store them on their computer, so that when they go to log in again they bypass the login page and go straight to loginOK.cfm? I also need to ensure that if a user puts in the loginOK.cfm straight into the address bar, that they get redirected to loginFail.cfm.
I know this doesn't sound too security concious, but there are reasons for doing it this way.
Also, as an aside - is setting a cookie the best way to do this? Or is there a better method?
Thanks in advance.