Dreamweaver cs3 connecting users , defining levels

Hello there, I am fairly new on dreamweaver and I am seeking help on how to use the connect user, disconnect user, restrict access to page.  By playing around I am able so far to create a login page and when succesfully username and password redirect to a main page, howver I need to create also a new level not admin , and I need other level, and persahps oteher main2 pager.. Much help is appreciated. Code, Links to a good tutorial on this, or an explanation.

Thanks
RickyGtzAsked:
Who is Participating?
 
Jason C. LevineNo oneCommented:
Hi RickyGtz,

>> Code, Links to a good tutorial on this, or an explanation.

Explanation.  In the table that holds your users, you need to have an additional column besides login and password that will define the user level.  This can be a text field (i.e., "User","Contributor","Moderator","Admin") or a numerical system (i.e., 1,2,3,4).  This column needs to be in place and populated before you go much further.

When you build the login system, you check submitted values against the username and password and if they match a user, you set the user level to a session variable and use it to do various things (redirect to a given page, show/hide regions on the page, etc).

The internal DW login behavior supports user levels as does the developer's toolkit and you will see the options in the Wizards for it.  

My personal preference is to use a numerical system whenever possible.   It allows you to set ranges of permissions much easier than text does.  So if your lowest level of user is defined as 1 and some function is available to everyone but that user, the definition is "allow if userlevel > 1" instead of "allow if userlevel = x or userlevel = y or userlevel = z"
0
 
RickyGtzAuthor Commented:
Hi thanks for your response. Can you briefly describ how can I use dreamweaver toolbox to create levels, see, I have the admin level 1  working, but the user (level 2 ) do I need to create another page for user,? or do I need to create another login transaction, this seems kind of confussing
0
 
Jason C. LevineNo oneCommented:
>> Can you briefly describ how can I use dreamweaver toolbox to create levels

You create the levels in your database FIRST.  The wizards will only work properly if you do it that way.

Once you have the database set up the way you want it, you need to go to the developer toolkit control panel and click "Login Settings"

From there, choose Validate Against Username, password and access level in the Options tab

Set the fields in the Database tab

Set the session variables in the Session tab

In the User Level tab, you set the default AND user-level-specific redirection options for the login.

Once you have done all of that, you can use the Login Form Wizard to create a form to test the login behavior.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
RickyGtzAuthor Commented:
Thanks , Now I understand it!
Regarding my other doubt,, do I need to create separate login pages, (forms) to login as an admin or user?
Or Can I use a same form to query one table on database ?
0
 
Jason C. LevineNo oneCommented:
>> do I need to create separate login pages, (forms) to login as an admin or user?
>> Or Can I use a same form to query one table on database

You should be able to use one login form to control everything.  The userlevel will be set in a session and that controls what happens after the user is logged in.  But the act of the login is the same no matter who is trying it, right?
0
 
RickyGtzAuthor Commented:
Well , no, I am having different loggedin page for admin and user , so It redirects diferent.
0
 
Jason C. LevineNo oneCommented:
Read my other answer.  You can define the redirection at the application level and use the same form to handle both types of users.  Check the Control Panel for the Developer's Tolkit and read the help files for Login Settings.
0
 
RickyGtzAuthor Commented:
ok thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.