Solved

Internet Application Logon

Posted on 2004-04-17
2
134 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

707 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now