<%@ 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>
<meta charset="utf-8">
<title>Insert title here</title>
</head>
<body>
<style>*{background:#ffc; margin:0px;}
a{text-decoration:none; cursor:pointer; color:black;}
a:hover{color:red; cursor:pointer;}</style>
<table border=1>
<tr>
<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","20182224","990804");
PreparedStatement pst=conn.prepareStatement("select * from R_MEMBER");
rs=pst.executeQuery();

while(rs.next()){
	String id=rs.getString("USERID");
	String passwd=rs.getString("USERPASS");
	String name=rs.getString("USERNAME");
	String email1=rs.getString("EMAILf");
	String email2=rs.getString("EMAILb");
	
%>
<tr>
<td><%= id %></td>
<td><%= passwd %></td>
<td><%= name %></td>
<td><%= email1 %></td>
<td><%= email2 %></td>
</tr>

<%
}
}catch(Exception e ){
	e.printStackTrace();
	
}

%>
<a href="main.jsp">돌아가기</a>

</table>
</body>
</html>