<%@ 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" %>
    
<!DOCTYPE html>
<html>
<head>
<link href='../css/join_style.css.css' rel='stylesheet' style='text/css'/>
<meta charset="UTF-8">
<title>회원 정보</title>
</head>
<body>
<table>
<tr>
<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","20150001","960323");
	   PreparedStatement pstmt=conn.prepareStatement("select * from o_member2");
	   rs=pstmt.executeQuery();
	   
	   while(rs.next()){
		   String id=rs.getString("id");
		   String password=rs.getString("password");
		   String name=rs.getString("name");
		   String gender=rs.getString("gender");
		   String birth=rs.getString("birth");
		   String email=rs.getString("email");
		   String phone=rs.getString("phone");
		   String address=rs.getString("address");
		   
		   
		   %>
		   <!--rs=pstmt.executeQuery(); : 데이터 베이스 접속 해제(결과물) 후 while 문을 이용해서 접속 해제 후 id,password,name 값을 받음  -->
	<tr>
		<td><%=id %></td>
		<td><%=password %></td>
		<td><%=name %></td>
		<td><%=gender %></td>
		<td><%=birth %></td>
		<td><%=email %></td>
		<td><%=phone %></td>
		<td><%=address %></td>
		<!-- 받은 값을 출력 -->
    </tr>



<% }
   }catch (Exception e) {
	   e.printStackTrace();
   }
	   
	  %>
	  <tr>
	  <td><A href = http://localhost:8080/JSP_DEV/member/view/LoginForm.jsp><input type = "button" value="뒤로" class="btn"></A></td>
	  </tr> <!-- 밑에 가운데 깔리게만들기 -->
</table>
</body>
</html>