Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement