<%@ 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>User's List</title>
 <style>
   h1{
        color : white;
        text-shadow: 3px 3px 5px #444444;
        text-align:center;
        font-size : 50px;
      }
      body{
		background-color:black;
	}
	table{
		border-collapse: collapse;
		width: 1000px;
		height: 400px;
		float: center;
	}
	td{
		text-align:center;
	}
      </style>
 </head>
 <body>  
  <h1> User's List </h1>
  
<table border="1" align="center">

<tr>
<th><font color="white">ID</font></th>
<th><font color="white">PassWord</font></th>
<th><font color="white">RePassWord</font></th>
<th><font color="white">Name</font></th>
<th><font color="white">Birth</font></th>
<th><font color="white">Phone-Number</font></th>
<th><font color="white">E-Mail</font></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","20182234","990802");
		PreparedStatement pstmt=conn.prepareStatement("select * from MEMBER") ;
		rs=pstmt.executeQuery();
		
		while(rs.next()){
			String id=rs.getString("id");
			String password=rs.getString("password");
			String repassword=rs.getString("repassword");
			String name=rs.getString("name");
			String birth=rs.getString("birth");
			String phone=rs.getString("phone");
			String email=rs.getString("email");
			 		
			%>
			<tr>
			<td><font color="white"><%= id %></font></td>
			<td><font color="white"><%= password %></font></td>
			<td><font color="white"><%= repassword %></font></td>
			<td><font color="white"><%= name %></font></td>
			<td><font color="white"><%= birth %></font></td>
			<td><font color="white"><%= phone %></font></td>
			<td><font color="white"><%= email %></font></td>
			 			
			</tr>
						
		<% }
}catch(Exception e){ 
		e.printStackTrace();
}
%>
</table>
<p>
<center><a href="http://localhost:8080/asdfsadf/member2/main2.jsp" style="text-decoration:none"> <font color="white">Go To You're Page !! </font></a></center>
<p>
  
</body>
</html>

