<%@ page import="java.sql.*" %> 
<%!
        Connection con;
        Statement st;
        PreparedStatement pst;
        ResultSet rs;
        String eid,uname,pwd,fn,ln,email,mobile,addr,city,state,cntry;
        int i;
        %>
        <%
            try{
            eid=(String)session.getAttribute("eid");
            uname=(String)session.getAttribute("uname");
            pwd=request.getParameter("pwd");
            fn=request.getParameter("fn");
            ln=request.getParameter("ln");
            email=request.getParameter("email");
            mobile=request.getParameter("mobile");
            addr=request.getParameter("addr");
            city=request.getParameter("city");
            state=request.getParameter("state");
            cntry=request.getParameter("cntry");
            Class.forName("oracle.jdbc.driver.OracleDriver");
            con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","c2t","c2t");
            pst=con.prepareStatement("update employee set eid=?,uname=?,pwd=?,fn=?,ln=?,email=?,mobile=?,addr=?,city=?,state=?,cntry=? where uname=?");
            pst.setString(1,eid);
            pst.setString(2,uname);
            pst.setString(3,pwd);
            pst.setString(4,fn);
            pst.setString(5,ln);
            pst.setString(6,email);
            pst.setString(7,mobile);
            pst.setString(8,addr);
            pst.setString(9,city);
            pst.setString(10,state);
            pst.setString(11,cntry);
            pst.setString(12,uname);
            pst.execute();
        %>
        <jsp:include page="editemp.jsp"></jsp:include>
        <div style="position: absolute; width: 380px; height: 29px; z-index: 3; left: 437px; top: 220px" id="layer3">
			<b><font face="Tahoma" size="2" color="#17CA1C"><br>Employee Updated successfully... </font></b></div>
	<%
        }catch(Exception e)
        {
           %>&nbsp;
        <jsp:include page="editemp.jsp"></jsp:include>
          <div style="position: absolute; width: 815px; height: 19px; z-index: 2; left: 123px; top: 472px" id="layer2">
	<b><font face="Tahoma" size="2" color="#E4AC03">Currently it is not updating... <br>
        </font></b><font color="#E4AC03"> </font></div>
        <%
       }
        %>