• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

Internet Application Logon

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!
1 Solution
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

If Rst.Eof then
Response.Redirect ("xxxxx") ' Not a valid user, throw to some page
Response.Redirect ("xxxxx") ' Valid user, continue to some page.
End if
mcdonald_gAuthor Commented:
Sorry, I'm not using ASP. I'm using VB.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now