/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import java.io.IOException;
import java.io.PrintWriter;
import java.sql.*;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Varun
 */
public class DeleteUser extends HttpServlet {
   
  
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
      
        PrintWriter out = response.getWriter();
        String s  = request.getParameter("id");
         try {

            Connection con = DataBase.getConnection();
            Statement st = con.createStatement();
            String q = "delete from  sdms.signup where empid = " +s;     
            
          st.executeUpdate(q);
         response.sendRedirect("admin.jsp");

           // out.print(s1);
        } catch (SQLException ex) {
           
        }
        
        
        
    } 

    /** 
    * Handles the HTTP <code>POST</code> method.
    * @param request servlet request
    * @param response servlet response
    */
   
}
