Samith,
Please try to do this way and let's see.
[code]
<%
String username = request.getParameter("user");
String passwd = request.getParameter("pwd");
StringBuffer cmdBuff = new StringBuffer();
cmdBuffer.append("INSERT into login (UserName,Password) ");
cmdBuffer.append(" values (");
cmdBuffer.append(userName);
cmdBuffer.append(" , ");
cmdBuffer.append(passwd);
cmdBuffer.append(" )");
s.executeUpdate(cmdBuffer.toString());
%>
Note that I assumed in this following portion of cmd , 'UserName' and 'Password' are the exact field names (case sensitive) of your table named 'login' in your db! So if different change it accordingly!
"INSERT into login (UserName,Password) ")
There could be some syntax errors in java statements. Please check. I haven't executed this code. But you get the idea.
regds
maha anna