If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Login scripts

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-09-03, 20:01
NST NST is offline
Registered User
 
Join Date: Dec 2003
Location: Singapore
Posts: 3
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.
Reply With Quote
  #2 (permalink)  
Old 12-09-03, 20:46
rnealejr rnealejr is offline
Registered User
 
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.
Reply With Quote
  #3 (permalink)  
Old 12-09-03, 21:21
NST NST is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 12-10-03, 08:17
Bullschmidt Bullschmidt is offline
Guru
 
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
Reply With Quote
  #5 (permalink)  
Old 12-10-03, 14:01
rnealejr rnealejr is offline
Registered User
 
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 ?
Reply With Quote
  #6 (permalink)  
Old 12-10-03, 14:53
Bullschmidt Bullschmidt is offline
Guru
 
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
Reply With Quote
  #7 (permalink)  
Old 12-11-03, 21:28
NST NST is offline
Registered User
 
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.
Reply With Quote
  #8 (permalink)  
Old 12-12-03, 01:39
rnealejr rnealejr is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On