Print Page | Close Window

Getting user validation

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=7275
Printed Date: 31 March 2026 at 1:17pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Getting user validation
Posted By: stevem2003
Subject: Getting user validation
Date Posted: 14 November 2003 at 10:28am

Hi,
I have a login script where username and password are checked against an Access database & each user has an access level, after users login, they are then redirected to a page which matches their access level. ie

If rsCheckUser("accesslevel") = "0" Then Response.Redirect"default_view.asp?name=" &strUserName End If
  If rsCheckUser("accesslevel") = "1" Then Response.Redirect"default_req.asp?name=" &strUserName End If
  If rsCheckUser("accesslevel") = "2" Then Response.Redirect"default_yield.asp?name=" &strUserName End If
  If rsCheckUser("accesslevel") = "3" Then Response.Redirect"default_auth.asp?name=" &strUserName End If
  If rsCheckUser("accesslevel") = "4" Then Response.Redirect"default.asp?name=" &strUserName End If
  If rsCheckUser("accesslevel") = "5" Then Response.Redirect"default_admin.asp?name=" &strUserName End If

My question is, how can I make sure that every page is protected, so that users cannot open pages that they do not have the correct access for?
I have tried to include this file, but I get an error msg:- (this file works when it isn't an include)

[Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides

Can I use different Session variables, for each accesslevel? or do I have to change the login script, so that I can use an include file??

TIA
Steve



-------------
There's no point running if you're on the wrong road!



Replies:
Posted By: KCWebMonkey
Date Posted: 14 November 2003 at 11:00am
It should work as an include file, as this is similar to what i do with one of my sites... what's the code you are using to include the file?


Posted By: stevem2003
Date Posted: 14 November 2003 at 11:06am
<!-- #include file="../check_user.asp" --> before <html> block

-------------
There's no point running if you're on the wrong road!


Posted By: Goofy Newfie
Date Posted: 15 November 2003 at 5:49pm

Hello,

You're help me too.  In the ASP files, how can you tell it where to go, if you types in the wrong  or right address?

Hope you can help me.

Thanks a million

Roland

Hi,
I have a login script where username and password are checked against an Access database & each user has an access level, after users login, they are then redirected to a page which matches their access level. ie

If rsCheckUser("accesslevel") = "0" Then Response.Redirect"default_view.asp?name=" &strUserName End If
  If rsCheckUser("accesslevel") = "1" Then Response.Redirect"default_req.asp?name=" &strUserName End If
  If rsCheckUser("accesslevel") = "2" Then Response.Redirect"default_yield.asp?name=" &strUserName End If
  If rsCheckUser("accesslevel") = "3" Then Response.Redirect"default_auth.asp?name=" &strUserName End If
  If rsCheckUser("accesslevel") = "4" Then Response.Redirect"default.asp?name=" &strUserName End If
  If rsCheckUser("accesslevel") = "5" Then Response.Redirect"default_admin.asp?name=" &strUserName End If

My question is, how can I make sure that every page is protected, so that users cannot open pages that they do not have the correct access for?
I have tried to include this file, but I get an error msg:- (this file works when it isn't an include)

[Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides

Can I use different Session variables, for each accesslevel? or do I have to change the login script, so that I can use an include file??

TIA
Steve

[/QUOTE]



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net