⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 register_page.jsp

📁 《J2EE专业项目实例开发》源代码
💻 JSP
字号:
<html>

<head>
<title>Money Banks, Inc. -- Register Page</title>
</head>
<body bgproperties="fixed" bgcolor="#CCCCFF">
<form method="POST" action="Home_page.htm">
<script languaue="JavaScript">
function home()
{
	open("Home_page.htm");
}
</script>
<%! int update=0; %>

	<%@ page import="java.util.*" %>
	<%@ page import="java.sql.*" %>
	<%@ page import="java.text.*" %>
	<%@ page import="java.sql.Date" %>

	<%@ page language = "java" %> 
	<%

	try{
	Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	Connection connect;

	connect=DriverManager.getConnection("jdbc:odbc:BankDataSource","","");
	Statement state;
	state = connect.createStatement();
	String strQuery1 = "select * from Ac_Requests" ;
	ResultSet result1 = state.executeQuery(strQuery1);
	int ctr1=0;
   while(result1.next())				
	{										
		ctr1=ctr1+1;
	}
	String cRegister="R000"+(ctr1+1);
	
	
	PreparedStatement stat2= connect.prepareStatement("insert into Ac_Requests values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
	stat2.setString(1,cRegister);
	stat2.setString(2,request.getParameter("branch"));
	stat2.setString(3,request.getParameter("AC_Type"));
	stat2.setString(4,request.getParameter("title"));
	stat2.setString(5,request.getParameter("txtFrstName"));
	stat2.setString(6,request.getParameter("txtMidName"));
	stat2.setString(7,request.getParameter("txtLastName"));
	
	String strdate=request.getParameter("year")+"-"+"02"+"-"+request.getParameter("date");
	Date date;
	date=Date.valueOf(strdate);
	stat2.setString(8,date.toString());
	stat2.setString(9,request.getParameter("phone_office"));
	stat2.setString(10,request.getParameter("address"));
	stat2.setString(11,request.getParameter("state"));
	stat2.setString(12,request.getParameter("zip"));
	stat2.setString(13,request.getParameter("E_mail"));
	stat2.setString(14,request.getParameter("ph_res"));
	
	
		stat2.executeUpdate();
	}
	catch(Exception e){
	out.println("done exception" +e);
	update=2;
	}	
	%>

<p></p>

<table border="0" width="100%" height="42">
  <tr>
    <td width="50%" height="36"><b><font size="5" ><i>Money Banks, Inc.</i></font></b></td>
    <td width="50%" height="36"></td>
  </tr>
</table>
<p><font size="3" >Database has been updated with the following
details. Our representative will soon visit you to complete the legal formalities. To modify the details, click the <b>Back</b> link.</font></p>

<table border="0" width="635" height="245">
  <tr>
    <td width="96" valign="top" height="239">
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><font ><b>Bank branch:</b></font>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><font><b>Account
  Type:</b>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"> <b> Name:</b>

  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><font ><b>Date of Birth:</b></font>
  </p>

  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><font ><b>Work Phone:</b>

  </font></p>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><b>Address:</b> 
  </p>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><b>State:</b></p>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><b>Zip:</b></p>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><b>E-mail ID:</b></p>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><b>Home Phone:</b></p>
  </font>
  </td>
  <td width="525"><p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><%= request.getParameter("branch") %>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><%= request.getParameter("AC_Type") %></b>
  
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><%= request.getParameter("txtFrstName") %>&nbsp;&nbsp;<%= request.getParameter("txtMidName") %>&nbsp;&nbsp;<%= request.getParameter("txtLastName") %>

  
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><%= request.getParameter("date") %>&nbsp;&nbsp;<%= request.getParameter("month") %>&nbsp;&nbsp;<%= request.getParameter("year") %>

  </font>
  </p>

  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><%= request.getParameter("phone_office") %>

  </p>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><%= request.getParameter("address") %></p>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><%= request.getParameter("state") %></p>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><%= request.getParameter("zip") %></p>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><%= request.getParameter("E_mail") %></p>
  <p style="margin-left: -2; margin-right: -2; margin-top: 5; margin-bottom: 5"><%= request.getParameter("ph_res") %></p>
  </font>
  </td>

  </tr>
</table>


  <p align="center"><input type="button" value="OK " name="Ok" onClick="home()">&nbsp;&nbsp;
  &nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <font ><a href="Register_page.htm">Back</a>

  </font>
</form>


</body>

</html>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -