<%@page import="java.sql.*" %>  
 <%


	
	String id = request.getParameter("id");
	
	Connection con;
	PreparedStatement pst;
	ResultSet rs;
	
	Class.forName("com.mysql.jdbc.Driver");
	con = DriverManager.getConnection("jdbc:mysql://localhost:3306/codespeedy","root","sqlsewebsite@2");
	
	pst = con.prepareStatement("delete from employee where id = ?");
	
	pst.setString(1, id);
	pst.executeUpdate();
%>

<script>

alert("Record Deleted Successfully");
<%

response.setHeader("Refresh","1;URL=index.jsp");

%>


</script>
 