请帮帮我..这是我在jsp中的fisrt代码,我不知道怎么做对
<body>
<%
String sid = request.getParameter("u_id");
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/mydb","root","M0hdZ@k1");
PreparedStatement ps = con.prepareStatement("delete from information where id = '"+sid+ "'");
ps.executeUpdate();
con.close();
ps.close();
}
catch(Exception ex)
{
out.println(ex.getMessage());
}
%>
<h1>Record Deleted...</h1><br>
<center><a href="Admin.jsp">Go Back</a></center>