Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login script wont work

Status
Not open for further replies.

JoeM6

Programmer
Aug 5, 2000
53
0
0
US
gamecentral.20m.com
I got this login script from a website. When I test it, it says that the login.asp page cannot be found. The script goes like this:



<%@ Language=VBScript %>
<% Response.Buffer = True %>

<HTML>
<BODY>

<%
UserName = Request.Form(&quot;username&quot;)
Password = Request.Form(&quot;password&quot;)
'grab the form contents

Set MyConn=Server.CreateObject(&quot;ADODB.Connection&quot;)
MyConn.Open &quot;your connection string here&quot;

SQL = &quot;Select UserName, Password From tblLogin &quot; _
& &quot;Where UserName = '&quot;&UserName&&quot;' And Password = '&quot;&Password&&quot;'&quot;

Set RS = MyConn.Execute(SQL)

If Not RS.EOF Then
Session(&quot;allow&quot;) = True
'if there is a match then show the page
%>


Put the contents of your page here.

<%
Else
Response.Redirect &quot;password1.html&quot;
RS.Close
MyConn.Close
Set RS = Nothing
Set MyConn = Nothing
End If
%>
'if there was no match then make the visitor try again to login.

</BODY>
</HTML>


What else do I have to change?
(Note, the name of the database file is tblLogin.mdb)

JoeM6
JPMJR11@aol.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top