<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" %> <%@ page import= "java.sql.*" %> <%@ page import= "java.sql.*" %> <% String name = (String)session.getAttribute("name"); String aname = (String)session.getAttribute("username"); String password = (String)session.getAttribute("password"); Connection con; ResultSet rs; Statement st; if(name ==null && aname==null && password ==null) { response.sendRedirect("index.jsp"); } else{ try{ Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost/iitDB","root","91don699629"); st=con.createStatement(); String id =request.getParameter("id"); String userid =request.getParameter("userid"); %> Department of Biotechnology
 





 


<% if(id!=null && userid!=null) { st.executeUpdate("delete from adminfac where id="+id+" and username ='" + userid + "'" ); %>                    The Faculty with ID : <%= id %> & User ID : <%= userid %> has been successfully deleted. <% } rs =st.executeQuery("select id,username,name from adminfac order by id"); %>

                    To Edit/Remove the Faculty Click Edit/Remove Button corresponding to the particular Faculty.

<% int j=0; String col =""; while(rs.next()) { j++; String ids = rs.getString(1); String uids =rs.getString(2); String names =rs.getString(3); if(names.equals("") || names==null) names ="Not Available"; if(j%2==0) col = "#E8F2F4"; else col ="#E0E8E9"; %> <% } %>
 Faculty ID   User ID   Name 
 Edit Faculty detail
 To Remove Faculty 
 <%=ids %>  <%=uids %>  <%=names %>
 
 

 

 
<% con.close(); } catch(SQLException sqle){ System.err.println(sqle.getMessage()); } catch (ClassNotFoundException cnfe){ System.err.println(cnfe.getMessage()); } catch (Exception e){ out.println(e.getMessage()); out.println("sql Exexption"); }} %>