Solved

Internet Application Logon

Posted on 2004-04-17
2
140 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 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