Discussion Locked

Implementing User and Password Web Site

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Ok, we have a website for our club that is programmed in HTML and CGI. We want to know the process, etc. required to add the feature of having members create an account and password and then be able to access customized web pages and ordering information. Is there an easy process/program that makes this possible? What is the actual process called? Is it "account management"? I have looked through dozens of programming manuals looking for "password" or user account setups and have found nothing. Any help would be great. Thank you.

2 replies

by shelleydoll

Hi - account management is what you're looking for to create and maintain users. Dynamic page generation is needed for custom user interfaces. You may need to look under 'user handling' or 'user management'. Here's a link to Perl user management scripts on hotscripts.com:
http://www.hotscripts.com/Perl/Scripts_and_Programs/User_Management/

There are literally dozens of ways to handle this, however here's the skinny:
- The basic user functions you need are: registration (to collect user info and create a userid, username, password, etc.), login, logoff, and account mgmt (where users can change their password, etc.). You also (might) need an administrative user and interface to change password, delete users, etc. - although this can allbe done in the database in a small implementation.

- There are several ways to go about presenting custom content for users. One common way introduces the concept of "state" to your user. This involves assigning a cookie or session to the user, that lets the web site know if the person is not logged in (usually state = 0), logged in (ususally state = 1), an administrative user (state = 2, for example), or something else. You set the state during log in, based on a bit you assigned and wrote to the database (or user prefs) during registration. When the user logs in, you check their password (that's a whole process in and of itself) and load user preferences and information into the cookie or session, including what state they will be in when logged in.

- Then, on your web pages, you can check to say something like - if (state == 1) { print "Hello, "; print $username; print "
"; } etc., or check the state to see if the user can see the page or not: if (state != 1) { ~send them to the login page using a header redirect } else { ~show the page }

Hope this helps get you pointed in the right direction!

by carolinashows

Thank you for your help... I have spent hours trying to come up with the right "wording" so I can reference it in books. Thank you!

This discussion is closed to new replies.