<%@ 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" %>
<%@ page session="true" %>

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

 <html>
 <head>
 <title>회원목록</title>
 <link href="css01.css" rel="stylesheet" type="text/css">
  <style>
body
{background-color:#CDF3F3;}
</style>
 </head>
 <body>
<div id="parent">
<div id="list">
  <p style="color:#0099ff">회원목록</p>
  
  
<table border="1" width="1000">

<tr>
<th bgcolor="#ffcccc" width="100">아이디</th>
<th bgcolor="#ffcccc" width="100">패스워드</th>
<th bgcolor="#ffcccc" width="100">이름</th>
<th bgcolor="#ffcccc" width="100">년</th>
<th bgcolor="#ffcccc" width="100">월</th>
<th bgcolor="#ffcccc" width="100">일</th>
<th bgcolor="#ffcccc" width="100">우편번호</th>
<th bgcolor="#ffcccc" width="100">주소</th>
<th bgcolor="#ffcccc" width="100">이메일</th>
<th bgcolor="#ffcccc" width="100">직업</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","20162487","970901");
		PreparedStatement pstmt=conn.prepareStatement("select * from member") ;
		rs=pstmt.executeQuery();
		
		while(rs.next()){
			String ID=rs.getString("ID");
			String password=rs.getString("password");
			String name=rs.getString("name");
			String year=rs.getString("year");
			String month=rs.getString("month");
			String day=rs.getString("day");
			String mailname=rs.getString("mailname");
			String address=rs.getString("address");
			String email=rs.getString("email");
			String job=rs.getString("job");
			 		
			%>
			<tr>
			<td align="center"><%= ID %></td>
			<td align="center"><%= password %></td>
			<td align="center"><%= name %></td>
			<td align="center"><%= year %></td>
			<td align="center"><%= month %></td>
			<td align="center"><%= day %></td>
			<td align="center"><%= mailname %></td>
			<td align="center"><%= address %></td>
			<td align="center"><%= email %></td>
			<td align="center"><%= job %></td>
			</tr>
						
		<% }
}catch(Exception e){ 
		e.printStackTrace();
}
%>
</table>
<style type="text/css"> 
a { text-decoration:none } 
</style> 
<p><A href="main.jsp">메인</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<A href="loginForm.jsp">로그인</A>

</body>
</html>