hi..all of u....

i have made a login page in html page...in which two text field there..named username and password...

i want to do the stuff that if the user enter correct username and password..then it displays a pop up window mentioning that u have successfully enetered and it then directly went into the mypage.jsp page...(targeted page)

and if users enter wrong entry then it displays error in another page..

plz... do the needful for me....i am not getting any thing....

my code is as follow:


try
{

String Username = request.getParameter("msno");
String Password = request.getParameter("pass");

sql = conn.prepareStatement("SELECT * FROM login_mast WHERE name = '" + Username + "' and password='"+Password+"' ");

results = sql.executeQuery();

while(results.next())
{

String Dbname = results.getString("name");
String Dbpassword = results.getString("password");


out.println("<TABLE >");
out.println("<TR>");
out.println("<TD><strong>Username</strong>:</TD>");
out.println("<TD><strong>Password</strong>:</TD></TR>");

out.println("<tr><td> <INPUT TYPE='TEXT' size='5' value='" + Dbname + "' readonly </td>");
out.println("<td> <INPUT TYPE='TEXT' size='5' value='" + Dbpassword + "' readonly </td></tr>");
}
}
catch (SQLException s)