Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Getting user validation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Getting user validation

 Post Reply Post Reply
Author
stevem2003 View Drop Down
Newbie
Newbie
Avatar

Joined: 07 November 2003
Location: United Kingdom
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevem2003 Quote  Post ReplyReply Direct Link To This Post Topic: Getting user validation
    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

Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
stevem2003 View Drop Down
Newbie
Newbie
Avatar

Joined: 07 November 2003
Location: United Kingdom
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevem2003 Quote  Post ReplyReply Direct Link To This Post Posted: 14 November 2003 at 11:06am
<!-- #include file="../check_user.asp" --> before <html> block
Back to Top
Goofy Newfie View Drop Down
Newbie
Newbie
Avatar

Joined: 03 October 2003
Location: Canada
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Goofy Newfie Quote  Post ReplyReply Direct Link To This Post 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]
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.