<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %> <%@ 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(); %> Department of Biotechnology
 





 


<% String fac_user_id = request.getParameter("fac_user_id"); String fac_password = request.getParameter("fac_password"); String fac_name = request.getParameter("fac_name"); String fac_id = request.getParameter("fac_id"); if(fac_user_id !=null && fac_password !=null) { int i = st.executeUpdate("update adminfac set name ='"+ fac_name +"', password = '" +fac_password+"' where id =" + fac_id); %>

User Detail succesfully updated <% } %>

 

Manage Existing Faculty

 
<% 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"); }} %>