<%@ include file="newindex.htm"%>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<html>
  <head>
    <title></title>
    <script language="javascript" src="JS/form_valid.js"></script>
  </head>
<body>
<form action="editprofile1.jsp" method="post" name="ctis" onsubmit="return checkEmpRegform()">
   <%!
        Connection con;
        Statement st;
        PreparedStatement pst;
        ResultSet rs;
        String custid,uname,pwd,fn,ln,email,mobile,addr,city,state,cntry;
        int i;
        %>
         <%
             uname=(String)session.getAttribute("uname");  
            Class.forName("oracle.jdbc.driver.OracleDriver"); 
            con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","c2t","c2t");
            st=con.createStatement();
            rs=st.executeQuery("select * from customer where uname='"+uname+"'");
            
            if(rs.next())
            {
                custid=rs.getString("custid");
                uname=rs.getString("uname");
                pwd=rs.getString("pwd");
                fn=rs.getString("fn");
                ln=rs.getString("ln");
                email=rs.getString("email");
                mobile=rs.getString("mobile");
                addr=rs.getString("addr");
                city=rs.getString("city");
                state=rs.getString("state");
                cntry=rs.getString("cntry");
             }
         %>
				<div style="position: absolute; width: 256px; height: 25px; z-index: 4; left: 293px; top: 249px" id="layer6">
				<b><font face="Arial" color="#F5A625" size="4">Customer Profile</font></b></div>
        <div style="position: absolute; width: 511px; height: 223px; z-index: 6; left: 436px; top: 294px" id="layer6">
            <table border="0" width="100%" id="table2" height="221">
                <tr><input type="hidden" name="custid" value="<%=custid%>" size="20">
                    <td><font face="Trebuchet MS" size="2">User Name</font></td>
                    <td><font color="#2D2E32"><b><%=uname%></b><input type="hidden" name="uname" value="<%=uname%>" size="20"></font></td>
                    <td><font face="Trebuchet MS" size="2">Password</font></td>
                    <td><font color="#2D2E32"><input type="password" name="pwd" value="<%=pwd%>" size="20"></font></td>
                </tr>
                <tr>
                    <td><font face="Trebuchet MS" size="2">First Name</font></td>
                    <td><font color="#2D2E32"><input type="text" name="fn" value="<%=fn%>" size="20"></font></td>
                    <td><font face="Trebuchet MS" size="2">Last Name</font></td>
                    <td><font color="#2D2E32"><input type="text" name="ln" value="<%=ln%>" size="20"></font></td>
                </tr>
                <tr>
                    <td><font face="Trebuchet MS" size="2">Email </font></td>
                    <td><font color="#2D2E32"><input type="text" name="email" value="<%=email%>" size="20"></font></td>
                    <td><font face="Trebuchet MS" size="2">Mobile</font></td>
                    <td><font color="#2D2E32"><input type="text" name="mobile" value="<%=mobile%>" size="20"></font></td>
                </tr>
                <tr>
                    <td><font face="Trebuchet MS" size="2">Address</font></td>
                    <td><font color="#2D2E32"><input type="text" name="addr" value="<%=addr%>" size="20"></font></td>
                    <td><font face="Trebuchet MS" size="2">City</font></td>
                    <td><font color="#2D2E32"><input type="text" name="city" value="<%=city%>" size="20"></font></td>
                </tr>
                <tr>
                    <td><font face="Trebuchet MS" size="2">State</font></td>
                    <td><font color="#2D2E32"><input type="text" name="state" value="<%=state%>" size="20"></font></td>
                    <td><font face="Trebuchet MS" size="2">Country</font></td>
                    <td><font color="#2D2E32"><input type="text" name="cntry" value="<%=cntry%>" size="20"></font></td>
                </tr>
                <tr>
                    <td height="58">&nbsp;</td>
                    <td height="58">&nbsp;</td>
                    <td height="58"><input type="submit" value="Update Profile" name="B1" style="float: right"></td>
                    <td height="58">&nbsp;</td>
                </tr>
                </table>
        </div>
   
	<div style="position: absolute; width: 100px; height: 26px; z-index: 7; left: 929px; top: 251px" id="layer7">
		<b><a href="custlogin.jsp"><font face="Tahoma" size="2" color="#2D2E32">
		Back</font></a></b></div>
           
            <div style="position: absolute; width: 100px; height: 27px; z-index: 5; left: 924px; top: 525px" id="layer8">
				<b><a href="login.jsp">
				<font face="Tahoma" size="2" color="#2D2E32">Logout</font></a></b></div>
           
<p>&nbsp;</p>
 
</html>