Forum Moderators: open
I'm working on our Church website and I'm after protecting only some pages of our 'members' area. Some are just general info so fine to be available to all, but some we want to restrict to users who register first.
We will probably just have one logon/password to start with but I would like to store the details in a database and query that. Therefore if we move over to individual passwords, I don't need to adjust the script.
Thinking about using a cookie (expires at the end of the session) to check if the logon/password has already been entered before opening up a protected page. I don't want people to have to keep logging on as they move around the site (including out of the members area).
However, I'm kinda new to Javascript (can customise existing scripts to get what I want but major newbie when it comes to writing from scratch).
Any ideas would be greatly appreciated.
Thanks.
Javascript, except in very extreme instances, is very easy to read, no way to protect your code from prying eyes, so if you want an actually password protected site, you need to go with server side scripting.