Results 1 to 8 of 8

Thread: Login scripts

  1. #1
    Join Date
    Dec 2003
    Location
    Singapore
    Posts
    3

    Unanswered: Login scripts

    hello

    I have a login page. however, how sholud i do to link it with the MS Access where i store all the authorise users' username and password? can u help me to solve?

    Thanks a million.

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    To clarify - you want to have a login page that will query an access database which will validate the userid/password entered on the form against the access database.

  3. #3
    Join Date
    Dec 2003
    Location
    Singapore
    Posts
    3

    hi

    yes. exactly what u had mention. I'm a newbie, hope u can teach me some skills. Thanks a million.

  4. #4
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    Perhaps have a login page that asks the user for his username and password. And whatever page that posts to (which could be the same page for a self posting form) tests these fields against what is in the database, sets the username and userlevel session variables accordingly, and then redirects to the proper page - i.e. back to the login page if the password is wrong (perhaps with a JavaScript popup saying wrong username/password combination) or to the main menu page if the password is correct:

    Session("UserName") = objRS("UserName")
    Session("UserLevel") = objRS("UserLevel")
    Response.Redirect "mainmenu.asp"

    Then you can use If Then's or Select Case on each page to control whether a user is allowed to actually be there and whether particular links of where a user can go actually show up.

    If (Session("UserLevel") <> "Admin") And (Session("UserLevel") <> "Regular") Then
    Response.Redirect "login.asp"
    End If

    And here is another resource too:

    HOW TO: How to Use a Database for User Names and Passwords in FrontPage 2000
    The information in this article applies to: Microsoft FrontPage 2000
    http://support.microsoft.com/default...-us;321503#S5E
    But the example seems somewhat convoluted with the login page including another file to do the password comparison against the database.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  5. #5
    Join Date
    Feb 2002
    Posts
    2,232
    Will these users be within the domain or active directory or will they be coming in from outside the domain ?

  6. #6
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    The users could be coming from anywhere in the world that has an Internet connection.
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  7. #7
    Join Date
    Dec 2003
    Location
    Singapore
    Posts
    3

    How to block my html source code from being view by others?

    ok, i have added the below scripts:

    <! -----------------Start Special Java Script Link ---------->
    <A HREF="javascript:void(0)" ONCLICK="open('yourpage.html','private','scrollbar s=1,toolbar=0,location=0, resizable=1,
    width=550,height=300')">Access Source Protected Page</A>
    <! -----------------End Special Java Script Link ---------->

    But in oder to do this, i have to change the 'yourpage.html'. but how to? i only have an extension of '.htm'. Can help me solve? thks a lot. I noe how to prevent the right click, but how to prevent the user from going to the toolbar, click on view --> source??

    thks.

  8. #8
    Join Date
    Feb 2002
    Posts
    2,232
    The question was really about developing an intranet vs internet authentification scheme. Not every web application is accessible from the internet.

    NST - If this is a true internet application, then you should look at using https to secure the login/password. This means that you will have to purchase a ssl certificate or your hosting service may have this as an option.
    If it is an intranet site, then your authentification methods will change.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •