Solved

Internet Application Logon

Posted on 2004-04-17
2
137 Views
Last Modified: 2011-09-20
I created an internet application.  I need a solution to have users log on and verify username and password using an internet database.  Can someone provide me code of how to do this!
0
Comment
Question by:mcdonald_g
2 Comments
 
LVL 9

Accepted Solution

by:
leechoonhwee earned 125 total points
ID: 10851815
An internet database is essentially just a normal database, nothing special. When you say internet application are you referring to asp? If so,

'This statement should be on all pages so that user cannot cache your URL and reenter without loggin in.
<% If Session("Authenticated")="NO" Then Response.Redirect("Login.asp")
End if
%>
.
....
...
...
<%
if request("Submit") = "Submit" then

Sql  = "Select * from Usertable where Username = '" & Request("Username") &"' and Password = '"& Request("Password") &"'"

Set Rst = Server.CreateObject("ADODB.RECORDSET")
Rst.Activeconnection = ' Put your connection here
Rst.Source = Sql
Rst.CursorType = 0
Rst.CursorLocation = 2
Rst.LockType = 3
Rst.Open

If Rst.Eof then
Response.Redirect ("xxxxx") ' Not a valid user, throw to some page
else
Session("Authenticated")="YES"
Response.Redirect ("xxxxx") ' Valid user, continue to some page.
End if
0
 

Author Comment

by:mcdonald_g
ID: 10870275
Sorry, I'm not using ASP. I'm using VB.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question