The basic idea I use on my pages works like this:

Main Page (log in, which transfers to "member's area" page)

Member's Area (set cookie with username & access level, etc / also check for
existence of cookies and then you know they have them and what resources
they have access to / if no cookie, send them back to the login page)
Then any queries you want to do later on, you just pull their member name
from the cookie. Also, you use CFIF to give the options on the access
levels.. so:

    <CFIF level 5>
        Level 5 information
    <cfif level 1>
        Level one info

Etc.

On any page that you need to be logged in to see, you simply throw the
script at the top of the page to check for the cookie. If no cookie, abort
and pop them back to the login page. Same goes for access. If a page should
only be accessed by level 5 users, throw a script at the top to check their
level, and if not five abort and throw them back to the last page they came
from or the main page.

Scott Berry
--
Computer Simplistics Support
"Simple Solutions for a Complex World"
http://www.c-s.net
661-296-4315


----- Original Message -----
From: "Tiffany" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 15, 2000 2:49 PM
Subject: Member database with access levels -=- CF4.0.1+Access97


> Hi, I'm 18 years old and have been working with CF for a few months now.
> I have read books, articles, etc and have learned enough on my own to use
> CF with Access 97 to make simple DB's -- adding, updating, deleting
> records, setting variables, using CFMail, etc. You know, the easy stuff.
> I think it's really cool, I love ColdFusion!
>
> My next project is to create a database of members with access levels. I
> have fields like:
>
> MemberName
> Password
> MemberSince
> AccessLevel
>
> I'm trying to figure out how to use session variables and cookies and
> stuff to log a user into a section of a website that will display certain
> options (links basically) depending on their access level (levels are
> like 1 to 5).  However, the only part I have done is checking their
> username and password against the database and sending them to a page
> once they have successfully logged in. The thing is, how do you make it
> so someone cant just copy the URL they were sent to when they logged in
> and paste in a browser window and have it pop up?  Cookies right?
>
> What I am looking for is someone to point me in the direction or to a
> resource that could explain how some of this works (coding wise).. any
> suggestions.. anything will help.
>
> Thanks!!  :)
>
> *~Tiffany~*
>
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>



------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to