Forums

This topic is locked

validation

Posted 18 Nov 2002 10:43:29
1
has voted
18 Nov 2002 10:43:29 Geno Tibbs posted:
I created a validation page that would give an answer if the proper username
and password are given, and one when there are not. The problem I'm having
is when I do give the correct username and password, I get the message that
I've given the wrong information, but when I check the database just in
case, it gives me the correct username and password.The message that starts
with "We're sorry," is the one that comes up when the correct username and password are give. Here is how the two messages look.
___________________________________________________________
**You were successfully logged in. Please click here to continue viewing our site as an authenticated user.
.......................................................................................................................
We're sorry, but we were unable to validate your username and password.
Please click the Back button on your browser's button bar to return to the
login form.
.......................................................................................................................
** represents the two asp codes, they are:
<%session("MM_Username"=rsLogin.Fields.Item("CustomerID".Value%>
<%session("MM_Password"=rsLogin.Fields.Item("Password".Value%>

Here's where the two are used:
<% If Not rsLogin.EOF Or Not rsLogin.BOF Then %>
<%session("MM_Username"=rsLogin.Fields.Item("CustomerID".Value%>
<%session("MM_Password"=rsLogin.Fields.Item("Password".Value%>

You were successfully logged in. Please <ahref="default.asp">click here</a> to continue viewing our site as an authenticated user.
<% End If ' end Not rsLogin.EOF Or NOT rsLogin.BOF
%>
</div>
</td>
</tr>
<tr>
<td>
<div align="center">
<% If rsLogin.EOF And rsLogin.BOF Then %>
We're sorry, but we were unable to validate your username and password. Please click the Back button on your
browser's button bar to return to the login form.
<% End If ' end rsLogin.EOF And rsLogin.BOF %>
</div>

I hope you are able to see the code. I didn't see it in the preview.

Reply to this topic