Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 20th, 2004, 11:02 PM
Authorized User
 
Join Date: Jan 2004
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login Page going to 3 different management areas

I was hoping someone could help me... I want ONE login page. The form would have a username box, a password box, and a list (student, staff, administration). If I were to sign in username:admin password:pswd and select administration, that would take me to the administration management area BUT it would not let me access the student management, for example, if I accidentally selected 'student'. Is this possible? OR is there a way to set the database up so it knows where to direct you? PLEASE, someone help me! I'll try to explain more clearly if I need to. THANKS.

 
Old January 21st, 2004, 09:18 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You could certainly set up the database to automatically choose where the user goes after they log in. You could store a user type with the user and retrieve that when you check the login username and password. Then redirect according to the returned user type.

However, there is a more important issue to also consider: securing the other pages. Even though the login process directs the user to a particular page, they could still manually enter in a URL going to a different area and access it after they've logged in unless you protect against that. You'd need to save the user type so that you could check it at the beginning of each page. One simple way would be to use the session. Check the value of the user type and redirect to the login page (or an appropriate page for the current user type) when the user accesses a page that they aren't supposed to.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie - grouping from different areas? wilgartw XSLT 5 October 30th, 2007 09:46 AM
Login page back to original page pablohoney Classic ASP Basics 1 October 3rd, 2006 07:09 PM
Linking to specific areas in a new page CathyM BOOK: Beginning ASP 3.0 2 August 2nd, 2005 09:23 AM
Newbie Help. Login to unique login page per user Kainan Classic ASP Professional 10 May 3rd, 2005 07:47 AM
Formatting Areas happyslug BOOK: Professional Crystal Reports for VS.NET 2 January 20th, 2005 01:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.