<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
    <%@ page import = "java.sql.*" %>
    <%@ page import = "java.sql.Connection" %>
    <%@ page import = "java.sql.DriverManager" %>
    <%@ page import = "java.sql.PreparedStatement" %>
    <%@ page import = "java.sql.ResultSet" %>

    <% request.setCharacterEncoding("UTF-8");%>


<html>
<head>
<style>
body
{
    background-color: #5CD1E5;
}
</style>
<style type="text/css"> 
a { text-decoration:none } 
</style> 
<meta charset="UTF-8">
<title>회원목록</title>
</head>
<body>
<table border="10" align="center" bordercolor=#008299>
<tr>

<th width = "800" align="center" colspan="8"  bgcolor=#B2EBF4><H1>회원 정보</H1></th>

</tr>
<tr>
<th  bgcolor=#B2EBF4>아이디</th>
<th  bgcolor=#B2EBF4>패스워드</th>
<th  bgcolor=#B2EBF4>이름</th>
<th  bgcolor=#B2EBF4>생년월일</th>
<th  bgcolor=#B2EBF4>우편번호</th>
<th  bgcolor=#B2EBF4>주소</th>
<th  bgcolor=#B2EBF4>이메일</th>
<th  bgcolor=#B2EBF4>직업</th>
</tr>
<%
ResultSet rs=null;
try{
	Class.forName("oracle.jdbc.driver.OracleDriver");
  	Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@168.126.146.45:1521:orcl","20162505","970401");
  	PreparedStatement pstmt=conn.prepareStatement("select * from member_2");
	rs=pstmt.executeQuery();
	
	while(rs.next()){
		String id=rs.getString("id");
		String pw=rs.getString("pw");
		String name=rs.getString("name");
		String birth=rs.getString("birth");
		String post=rs.getString("post");
		String addr=rs.getString("addr");
		String email=rs.getString("email");
		String job=rs.getString("job");
	%>
	
	<tr>
	<td  bgcolor=#B2EBF4><%= id %> </td>
	<td  bgcolor=#B2EBF4><%=pw %> </td>
	<td  bgcolor=#B2EBF4><%=name %> </td>
	<td  bgcolor=#B2EBF4><%=birth %> </td>
	<td  bgcolor=#B2EBF4><%=post %> </td>
	<td  bgcolor=#B2EBF4><%=addr %> </td>
	<td  bgcolor=#B2EBF4><%=email %> </td>
	<td  bgcolor=#B2EBF4><%=job %> </td>
	</tr>
   <% }
	}
	catch(Exception e) {
	e.printStackTrace();
	}
    %>
    
    <tr>
<td algin="center" bgcolor=#B2EBF4 colspan="8">
<button type="button" class="btn btn-default" onclick="location.href='main2.jsp'">메인화면</button></td>
</tr>
</table>

</body>
</html>