Argh. I can't get my head around the logic behnd authentication someone to use a script.
I currently have a sub called &check_credentials; at the top of my script which is called before any other thing happens. This basicaly checks to see if you've got a cookie. If not, returns you to an error page.
However, I can't ever login now because it alwasys takes me to the error_sub because I don't have my cookies.
Argh :-\
How do others make sure that a user is authenticated at every page he or she visits? But keeping overheads down? In my authentication sub it only checks to see if a cookie exists - I don't want to make a database connection to verify the cookie as this would have to be done for every single page loaded. Is this OK?
Cheers
- wil
I currently have a sub called &check_credentials; at the top of my script which is called before any other thing happens. This basicaly checks to see if you've got a cookie. If not, returns you to an error page.
However, I can't ever login now because it alwasys takes me to the error_sub because I don't have my cookies.
Argh :-\
How do others make sure that a user is authenticated at every page he or she visits? But keeping overheads down? In my authentication sub it only checks to see if a cookie exists - I don't want to make a database connection to verify the cookie as this would have to be done for every single page loaded. Is this OK?
Cheers
- wil