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

<% request.setCharacterEncoding("utf-8");%>
<%
String id=request.getParameter("id");
String passwd=request.getParameter("password");
String name=request.getParameter("name");

String str="";

try{
	Class.forName("oracle.jdbc.driver.OracleDriver");
	Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@168.126.146.45:1521:orcl", "20182236", "990319");
	PreparedStatement pstmt=conn.prepareStatement("insert into o_member(id,password,name) values(?,?,?)");
	pstmt.setString(1,id);
	pstmt.setString(2,passwd);
	pstmt.setString(3,name);
	
	pstmt.executeUpdate();
	pstmt.close();
	conn.close();
	
	str="o_member 테이블에 새로운 레코드를 추가했습니다.";
}catch(Exception e){
	e.printStackTrace();
	str="o_member 테이블에 새로운 레코드를 추가에 실패했습니다.";
}
%>
<html>
<head>
<title>레코드 추가</title>
</head>
<body>
<%=str %><p>

<A href="http://Localhost:8080/member_20182236/p_member/list.jsp">click here!</A></p>
</body>
</html>