?
Solved

Internet Application Logon

Posted on 2004-04-17
2
Medium Priority
?
141 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 500 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 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