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!
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending