|
<% Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
try {
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection ("jdbc: odbc: xiaohai", "sa", "");
stmt = conn.createStatement ();
String strSQL = "insert into ProConsult";
strSQL + = "values (";
strSQL + = "'" + projectname + "',";
strSQL + = "'" + sort + "',";
strSQL + = "'" + contactmen + "',";
strSQL + = "'" + contactphone + "',";
strSQL + = "'" + examarrange + "',";
strSQL + = "'" + examrequire + "',";
strSQL + = "'" + examtime + "',";
strSQL + = "'" + profinish + "',";
strSQL + = "'" + responsemen + "',";
strSQL + = "'" + exammen + "')";
stmt.executeUpdate (strSQL);
stmt.close ();
out.println ("<font> Project information is as follows: </ font>");
out.println ("<center> <font size = '3'>" + "Project registration was successful and successfully sent to" + exammen + "</ font> </ center>");
out.println ("<table width = '70% 'border =' 1 'cellspacing =' 1 'align =' center 'bgcolor =' # FFFFFF 'bordercolorlight =' # 006633 '> <tr bgcolor =' # ffffff '> <td width = '30% 'height = '25' align = 'right'> Project name: </ td> <td height = '25 'width = '70%'> ");
out.println (projectname); out.println ("</ td> </ tr>");
out.println ("<tr bgcolor = '# ffffff'> <td align = 'right' height = '25 '> Category: </ td> <td>");
out.println (sort); out.println ("</ td> </ tr>");
out.println ("<tr bgcolor = '# ffffff'> <td align = 'right' height = '25 '> Contact: </ td> <td>");
out.println (contactmen); out.println ("</ td> </ tr>");
out.println ("<tr bgcolor = '# ffffff'> <td align = 'right' height = '25 '> Contact number: </ td> <td>");
out.println (contactphone); out.println ("</ td> </ tr>");
out.println ("<tr bgcolor = '# ffffff'> <td align = 'right' height = '25 '> Survey arrangement: </ td>");
out.println ("<td> <input type = 'hidden' value = '" + examarrange + "'>"); out.println (examarrange); out.println ("</ td> </ tr>");
out.println ("<tr bgcolor = '# ffffff'> <td align = 'right' height = '25 '> Survey requirements: </ td>");
out.println ("<td> <input type = 'hidden' value = '" + examrequire + "'>"); out.println (examrequire); out.println ("</ td> </ tr>");
out.println ("<tr bgcolor = '# ffffff'> <td align = 'right' height = '25 '> Survey completion date: </ td> <td>");
out.println (examtime); out.println ("</ td> </ tr>");
out.println ("<tr bgcolor = '# ffffff'> <td align = 'right' height = '25 '> Project completion date: </ td> <td>");
out.println (profinish); out.println ("</ td> </ tr>");
out.println ("<tr bgcolor = '# ffffff'> <td align = 'right' height = '25 '> Negotiator: </ td> <td>");
out.println (responsemen); out.println ("</ td> </ tr>");
out.println ("<tr bgcolor = '# ffffff'> <td align = 'right' height = '25 '> Investigator: </ td> <td>");
out.println (exammen); out.println ("</ td> </ tr>");
} catch (Exception e) {out.println ("<center> <font size = '3'>" + "Project registration failed. </ font> </ center>");}
finally {
try {
if (stmt! = null) {stmt.close ();}
if (conn! = null) {conn.close ();}
} catch (SQLException e) {}
}
%> |
|