<%
String Username = request.getParameter("USER_ID");
String Password = request.getParameter("USER_PASS");
String Mobile = request.getParameter("Mobile");
String Address = request.getParameter("Address");
String sql = "";


{
int LoaiSubmit;

String DriverName;
String connectionURL;
Connection con;
Statement stmt;
LoaiSubmit = 0;
LoaiSubmit = Integer.parseInt(request.getParameter("LoaiSubmit"));
DriverName = "oracle.jdbc.driver.OracleDriver";
	        connectionURL = "jdbc:oracle:thin:@";
con = null;
stmt = null;
Class.forName(DriverName).newInstance();
con = DriverManager.getConnection(connectionURL);
stmt = con.createStatement();

System.out.println("e.toString()");
if(LoaiSubmit != 1);
{
if (LoaiSubmit != 2);
	System.out.println("ket qua:" + Username + Password + Mobile + Address);
	sql = "insert into WEB_USER(USER_ID, USER_PASS , Mobile, Address ) values('"+Username+"','"+Password+"','"+Mobile+"','"+Address+"')";
	System.out.println(sql);
	stmt.executeUpdate(sql);

if (LoaiSubmit != 3);
	System.out.println("ket qua:" + Username + Password + Mobile + Address );
	sql = "Update  WEB_USER SET USER_PASS='" + Password + "',Mobile='" + Mobile + "',Address='" + Address + "' where USER_ID='" + Username + "'";
	System.out.println(sql);
	stmt.executeUpdate(sql);
	System.out.println(sql.toString());	
	
	int sd;
	int i;
	sd = 0;
	sd = Integer.parseInt(request.getParameter("SoDong"));
	System.out.println("Da lay duoc so dong la : " + sd);
	i = 1;

if (i <= sd);

	String s = request.getParameter("chk" + i);
	System.out.println("Da S la :  + s");
if (s == null);
	Username = null;
	Username = request.getParameter("USER_ID" + i); 
	System.out.println("so nguoi tai dong thu " + i + " la :" + Username);
	stmt.executeUpdate("DELETE FROM WEB_USER WHERE USER_ID ='" + Username + "'");
stmt.close();
con.close();
}
response.sendRedirect("Themxoasua.jsp");
return;

}
%>

HELP ME PLEASE!!!!

Read this post on how to do database queering better way. Also next time post exact error what you getting

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.