?? register_confirm.jsp
字號:
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>注冊確認(rèn)</title>
<style type="text/css">
<!--
.STYLE2 {color: #FFFF00}
.STYLE3 {color: #0000FF}
.STYLE4 {color: #00FF00}
body {
background-color: #000000;
}
-->
</style>
</head>
<body>
<div align="center">
<table width="726" border="0">
<tr>
<td width="720">
<%!
String name=new String().trim();
String pass=new String().trim();
String pass1=new String().trim();
String sex=new String().trim();
String birthday=new String().trim();
String mail=new String().trim();
String address=new String().trim();
String phone=new String().trim();
%>
<%
name=request.getParameter("name");
session.setAttribute("name",name);
pass=request.getParameter("pass");
session.setAttribute("pass",pass);
pass1=request.getParameter("pass1");
session.setAttribute("pass1",pass1);
sex=request.getParameter("sex");
if(sex.equals("m")){
sex="男";
}else
sex="女";
session.setAttribute("sex",sex);
birthday=request.getParameter("birthday");
session.setAttribute("birthday",birthday);
mail=request.getParameter("mail");
session.setAttribute("mail",mail);
address=request.getParameter("address");
session.setAttribute("address",address);
phone=request.getParameter("phone");
session.setAttribute("phone",phone);
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:book");
Statement stmt=conn.createStatement();
String sql="select * from b_user where u_name='"+name+"'";
ResultSet rs=stmt.executeQuery(sql);
if(rs.next())
{
rs.close();
session.putValue("register_message","用戶名已存在,請重新注冊!");
%>
<jsp:forward page="register.jsp"/>
<% }
else
{
rs.close();
}
stmt.close();
conn.close();
}
catch(Exception e){}
%>
<form method="post" action="db.jsp">
<input type="hidden" name="name" value="<%=name%>" />
<input type="hidden" name="password" value="<%=pass%>" />
<input type="hidden" name="password" value="<%=pass1%>" />
<input type="hidden" name="password" value="<%=sex%>" />
<input type="hidden" name="password" value="<%=birthday%>" />
<input type="hidden" name="e_mail" value="<%=mail%>" />
<input type="hidden" name="address" value="<%=address%>" />
<input type="hidden" name="telephone" value="<%=phone%>" />
<span class="STYLE4">親愛的<%=name%>,請檢查您的注冊信息</span><br />
<br />
<table width="60%" border="1">
<tr>
<td width="50%"><span class="STYLE2">您的帳號:</span></td>
<td width="50%"><span class="STYLE3"><%=name%></span></td>
</tr>
<tr>
<td height="25"><span class="STYLE2">您的密碼:</span></td>
<td><span class="STYLE3"><%=pass%></span></td>
</tr>
<tr>
<td height="25"><span class="STYLE2">確認(rèn)密碼:</span></td>
<td><span class="STYLE3"><%=pass1%></span></td>
</tr>
<tr>
<td height="25"><span class="STYLE2">性別:</span></td>
<td><span class="STYLE3"><%=sex%></span></td>
</tr>
<tr>
<td><span class="STYLE2">郵箱地址</span></td>
<td><span class="STYLE3"><%=mail%></span></td>
</tr>
<tr>
<td><span class="STYLE2">您的地址:</span></td>
<td><span class="STYLE3"><%=address%></span></td>
</tr>
<tr>
<td><span class="STYLE2">聯(lián)系方式</span></td>
<td><span class="STYLE3"><%=phone%></span></td>
</tr>
</table>
<div align="center">
<input type="submit" value="提交注冊" />
<input type="button" value="返回修改" onclick="history.back()" />
</div>
</form></td>
</tr>
</table>
</div>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -