Forum Moderators: open

Message Too Old, No Replies

Javascript & Password Protection

         

MrsHudson

1:14 pm on Feb 24, 2004 (gmt 0)

10+ Year Member



Hi,

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.

isitreal

5:55 pm on Feb 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you want security for your passwords it's pretty much impossible to do using javascript, you'd be better off using a server side script like PHP, you can easily find logon type page scripts all over the internet that you could just plug in to your pages after reading the documentation.

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.

MrsHudson

1:22 pm on Feb 25, 2004 (gmt 0)

10+ Year Member



Thanks,

I'll look into PHP!