<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.sql.Connection" %>
    <%@ page import="java.sql.DriverManager" %>
    <%@ page import="java.sql.PreparedStatement" %>
    <%@ page import="java.sql.ResultSet" %>
    
    <% String uid=request.getParameter("Uid");
    String upass=request.getParameter("Upass");
    String uname=request.getParameter("Uname");
    String email1=request.getParameter("Email1");
    String email2=request.getParameter("Email2");
    String str="";%>
    
    
    <% try{
    	Class.forName("oracle.jdbc.driver.OracleDriver");
		Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@168.126.146.45:1521:orcl","20182224","990804");
		PreparedStatement pt=conn.prepareStatement("insert into R_MEMBER(USERID,USERPASS,USERNAME,EMAILF,EMAILB) values(?,?,?,?,?)");
		pt.setString(1,uid);
		pt.setString(2,upass);
		pt.setString(3,uname);
		pt.setString(4,email1);
		pt.setString(5,email2);
		pt.executeUpdate();
		pt.close();
		conn.close();
		
	 str="회원가입에 성공하셨습니다.";
	 
    }catch(Exception e){
    	e.printStackTrace();
		str="회원가입에 실패하셨습니다.";
    	
    } %>
<!DOCTYPE html>
<html>
<head>
<STYLE>
*{background:#ffc; margin:0px;}
a{text-decoration:none; cursor:pointer; color:black;}
a:hover{color:red; cursor:pointer;}
</STYLE>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body>
	<%=str %><br>
	<a href="../main.jsp">돌아가기</a>
</body>
</html>