tubisarscev Posted November 18, 2005 Share Posted November 18, 2005 hi, i want different users to view different pages. i save usernames and passwords in an access database and i ask users at the beginning of the first page. but how can i manage seperate pages for them? (for exp normal users and admins must see different pages) Link to comment Share on other sites More sharing options...
vijay Posted November 18, 2005 Share Posted November 18, 2005 Hi, For that I want to give u one suggestion that isDefine Role in database in accesslike admin,wise admin, normal useraccording to ur relavent acceess wheevr we open particular page at that time it check srole first and then system make enter to that user otherwise it will give particular msg to user access denied like that .U can Do this easily Link to comment Share on other sites More sharing options...
tubisarscev Posted November 29, 2005 Author Share Posted November 29, 2005 thanks, i have solved it.i have defined a field called adminYorN in which i give 0 for ordinary users and 1 for admins in the database i store the username and password information.i query for the adminYorN value when i check for the username and password. if it's 1 i include admin.inc else user.inc which have different menus.it's easy Link to comment Share on other sites More sharing options...
Skemcin Posted November 29, 2005 Share Posted November 29, 2005 thanks, i have solved it.i have defined a field called adminYorN in which i give 0 for ordinary users and 1 for admins in the database i store the username and password information.i query for the adminYorN value when i check for the username and password. if it's 1 i include admin.inc else user.inc which have different menus.it's easy Make sure you set that value as a session variable and not a cookie - even if you expire the cookie at the end of the browser session it can be manipulated.If you are going to have your administration tools inline with your public site, then you might want to look over a presentation I recently gave to a Macromedia Users Group. I'd strongly recommend that you isolate your administration pages and not make them part of your public site. The admin application should be in its own folder.But thats just how I feel. :)P.S. now that I know that its "admin.inc else user.inc" I could access the file directly by entering the absolute path in my browser. If you are only relying on that initial SQL statement that conditionally generates the menu - I can get in with very little effort.(I wouldn't do this obviously, but there are many folks who will try) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now