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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Q...

Status
Not open for further replies.

help120

Technical User
Apr 15, 2001
198
US
<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.ConnectionString = &quot;DBQ=C:\inetpub\finalphase\ Access Driver (*.mdb)}&quot;
MyConn.Open

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)
'#####################################################################help
Set RS2=Server.CreateObject(&quot;ADODB.RecordSet&quot;)
'#####################################################################help
If Not RS.EOF Then
Session(&quot;allow&quot;) = True
'if there is a match then show the page
%>
<% '#####################################################################help %>
<% RS2.Open &quot;Select * From UserName&quot;, MyConn %>
^UserName^ I would like for this to be = to what ever was typed into the username field UserName = Request.Form(&quot;username&quot;)
<% '#####################################################################help %>
Put the contents of your page here.

<%
Else
Response.Redirect &quot;RS.Close
RS2.Close
MyConn.Close
Set RS = Nothing
Set RS2 = Nothing
Set MyConn = Nothing
End If
%>
</body>
</html>
 
sorry check out the parts that are marked with
'#################################################help
code
'#################################################help
 
uh . .
<% RS2.Open &quot;Select * From tblLogin where username='&quot;&request.form(&quot;username&quot;)&&quot;'&quot;, MyConn %>

or
<% RS2.Open &quot;Select * From tblLogin where username='&quot;&username&&quot;'&quot;, MyConn %>
since you've already got the username form the form.

if that's not what you meant (and I very much doubt it is), then can you please explain what you're looking for? --------------------------------------------------
- better than toast.
Penguins - better than --------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top