sorry for annoying, i am quite stupid in it.
<html>
<head>
<title>Welcome to the online Auction...</title></head>
<body>
<% try
{
String strUsername = request.getParameter("username");
String strPassword = request.getParameter("password");
Class.forName ("mysql-connector-java-5.0.8-bin");
Connection myConn = DriverManager.getConnection("jdbc:mysql://localhost/user.jsp,admin,admin");
Statement myStatement = myConn.createStatement ();
String strSQL = "SELECT UserName,UserPwd from user where UserName="",UserPwd="";
ResultSet myResult = myStatement.executeQuery(strSQL);
String strUser = myResult.getString("UserName");
String strPass = myResult.getString("Password");
while(myResult.next())
{
if(strUsername.equals(strUser) && strPassword.equals(strPass))
{
out.println("Login Successful!");
}
else
{
out.println("Login Fail!");
}
}
myConn.close();
}
catch(Exception e){}
%>
</body>
</html>
i am new to this.
Please help me with this.
my jar file name is mysql-connector-java-5.0.8-bin
Please help me out.
thanks