Chandrasekar Chandrasekar - 7 months ago 45
Javascript Question

Case sensitivity in password validation in login form

I have a login form, i am done with connecting to DB, everything works fine. I have a username = a and password = b in my DB. During login if i enter "B" in password, i am able to login, can some one help me out with validating that password field. Thx in advance.
The JSP code is as follows:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

<body bgcolor="#FFCC66">
<form action="CommonLog" method="post">
<table align="center">
<td><font style="font-size: 20px">Name</font></td>
<td><input type="text" name="name" style="width: 228px; height: 34px;"/></td>
<td><font style="font-size: 20px">Password</font></td>
<td><input type="password" name="pass" style="width: 229px; height: 36px"/></td>
<td><input type="submit" value="Login"
style="width: 88px; height: 41px; font-size: 15px" /></td>


Your Password matching criteria can be

sending the username and password to db directly and then matching your data or

retrieving data from the table completly and then matching data.