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

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>회원 리스트</title>
</head>
<body>
	<h2>회원 리스트</h2>

	<table border=1>
		<tr>
			<th>아이디</th>
			<th>패스워드</th>
			<th>이름</th>
			<th>생년</th>
			<th>생월</th>
			<th>생일</th>
			<th>성별</th>
			<th>이메일</th>
			<th>휴대전화</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", "20182264",
						"981218");
				PreparedStatement pstmt = conn.prepareStatement("select * from member_2");
				rs = pstmt.executeQuery();

				while (rs.next()) {
					String id = rs.getString("id");
					String password = rs.getString("pw");
					String name = rs.getString("name");
					String bYear = rs.getString("bYear");
					String bMonth = rs.getString("bMonth");
					String bDay = rs.getString("bDay");
					String gender = rs.getString("gender");
					String email = rs.getString("email");
					String phone = rs.getString("phone");
		%>
		<tr>
			<td><%=id%></td>
			<td><%=password%></td>
			<td><%=name%></td>
			<td><%=bYear%></td>
			<td><%=bMonth%></td>
			<td><%=bDay%></td>
			<td><%=gender%></td>
			<td><%=email%></td>
			<td><%=phone%></td>
		</tr>
		<%
			}
			} catch (Exception e) {
				e.printStackTrace();
			}
		%>
	</table>
	
	<a href="http://localhost:8080/FinalTest2/LoginForm.jsp">로그인 하기</a><br>
<a href="http://localhost:8080/FinalTest2/Main.jsp">메인화면으로 가기</a>


</body>
</html>