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

📄 login2.jsp.bak

📁 一个完整JSP连接数据库的程序.包括连接
💻 BAK
字号:
<%@ page language="java" contentType="text/html;charset=gb2312" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.lang.*" %>
<html>
<title>小小的太阳 </title>
<body style="color: #ccFF">
<jsp:useBean id="DbLink" scope="page" class="MyBook.DbLink" />
<div align="center">
  <table border="3" borderColor="#ffffff" borderColorDark="#ffffff" borderColorLight="#ffffff" cellSpacing="0" height="1008" style="BORDER-BOTTOM-COLOR: #ffffff; BORDER-BOTTOM-STYLE: solid; BORDER-LEFT-COLOR: #ffffff; BORDER-LEFT-STYLE: solid; BORDER-RIGHT-COLOR: #ffffff; BORDER-RIGHT-STYLE: solid; BORDER-TOP-COLOR: #ffffff; BORDER-TOP-STYLE: solid" width="892">
    <tbody>
      <tr>
        <td align="middle" bgColor="#ccccff" height="1" width="80%">
        <%@ include file="headOver.html" %>
        </td>
      </tr>
      <tr>
      <form method="post" action="Login2.jsp?Param=submit">
        <td align="middle" bgColor="#ccffff" height="26" width="884"><font color="#FF00FF">..</font><font color="#000000">网易通行证</font><font color="#FF00FF"> 
          </font><font color="#0099FF">&gt;</font><font color="#FF00FF"> </font><b><font color="#663300">注册通行证</font><font color="#FF00FF"> 
          -- </font><font color="#000000">填写个人资料</font></b></td>
      </tr>
      <tr>
        <td align="middle" bgColor="#FFCCFF" height="907" width="884">
        <%
        String Param =(String) request.getParameter("Param");
        if (Param != null)
        {
          String MM1 =(String) request.getParameter("MM1");
          String MM2 = (String) request.getParameter("MM2");
          String XB = request.getParameter("XB");
          if (XB != null)
          {
            XB = new String(request.getParameter("XB").trim().getBytes("iso-8859-1"));
          }
          String CSNY = (String) request.getParameter("year")+"-"+ (String) request.getParameter("month")+"-"+(String) request.getParameter("day");
          String DZYX = (String) request.getParameter("email");
          String DH = (String) request.getParameter("DH");
          String DQ = request.getParameter("DQ");
          if(DQ != null)
          {
            DQ = new String(request.getParameter("DQ").trim().getBytes("iso-8859-1"));
          }
          if ((!(MM1.equals("")))&&(!(MM2.equals("")))&&(XB != null)&&(CSNY != null)&&(DQ != null)&&(DH != null))
          {
            if (! MM1.equals(MM2))
            {
              out.println("<font color=342aa><div align=center>两次密码有错!</div></font><br>");
            }
            else
            {
              DbLink.DbLink("sa","123456","MyDataBase");
              String StrSQL = "insert into Login (YHM,MM,XB,CSNY,DZYX,DH,DQ,ZCSJ,GLCS) values ('"+session.getAttribute("YHM")+"','"+MM1+"','"+XB+"','"+CSNY+"','"+DZYX+"','"+DH+"','"+DQ+"',getDate(),0)";
              DbLink.DbExcute(StrSQL);
              response.sendRedirect("Login3.jsp");
              //out.println(StrSQL);
            }
          }
          else 
          {
            out.println("<font color=342aa><div align=center>数据填写不完整!</div></font><br>");
          }
       }
       %> 
      <br>
          <table align="center" border="0" cellPadding="0" cellSpacing="1" bgcolor="#FF00FF">
            <tbody>
              <tr>
                <td bgColor="#FFCCFF" height="20" width="3"> </td>
                <td bgColor="#FFCCFF" width="4"> </td>
                <td bgColor="#FFCCFF" width="5"> </td>
                <td align="middle" bgColor="#FFCCFF" class="p3" width="200">:: 
                  填 写 个 人 资 料 ::</td>
                <td bgColor="#FFCCFF" width="5"> </td>
                <td bgColor="#FFCCFF" width="4"> </td>
                <td bgColor="#FFCCFF" width="3"> </td>
              </tr>
            </tbody>
          </table>
          <table align="center" border="0" cellPadding="2" cellSpacing="2" width="750">
            <tbody>
              <tr>
                <td colSpan="3" height="20"> <br>
                  请填写个人资料:(注意带有<font color="#ff9933">*</font>的项目必须填写)</td>
              </tr>
            </tbody>
          </table>
          <table align="center" border="0" cellSpacing="1" width="750">
              <tbody>
                <tr>
                  <td align="right" class="p2"><font color="#ff9933">*</font> 
                    密码</td>
                  <td align="right" class="p2" rowSpan="8">&nbsp;</td>
                  <td bgColor="#e5e6d3"><font size="2">&nbsp;&nbsp;</font><b> <input maxLength="12" name="MM1" size="25" type="Password" ></b></td>
                  <td bgColor="#e5e6d3" class="p2" noWrap>密码可使用长度为6-14的任何字符,并区分英文字母大小写</td>
                </tr>
                <tr>
                  <td align="right" class="p2"><font color="#ff9933">*</font> 
                    密码确认</td>
                  <td bgColor="#e5e6d3"><font size="2">&nbsp;&nbsp;</font><b> <input maxLength="12" name="MM2" size="25" type="Password" ></b></td>
                  <td bgColor="#e5e6d3" class="p2">请再输入一次密码</td>
                </tr>
                <tr>
                  <td align="right" class="p2"><font color="#ff9933">*</font> 
                    出生日期</td>
                  <td bgColor="#e5e6d3" class="p1"><font size="2">
                  &nbsp;&nbsp;&nbsp;
                  </font>
                  <select  name="year" Style="width:60" >
                    <%
                      for(int y=1900;y<2020;y++)
                      {
                       if(y==1978)
                       {
                         out.print("<option selected>"+y+"</option>"); 
                        }
                        else
                        {
                         out.print("<option>"+ y+"</option>");
                        }
                      }
                    %>
                  </select> 
                    年 <select name="month">
                      <option selected value="01">01</option>
                      <option value="02">02</option>
                      <option value="03">03</option>
                      <option value="04">04</option>
                      <option value="05">05</option>
                      <option value="06">06</option>
                      <option value="07">07</option>
                      <option value="08">08</option>
                      <option value="09">09</option>
                      <option value="10">10</option>
                      <option value="11">11</option>
                      <option value="12">12</option>
                    </select> 月 
                    <select name="day" > 
                      <option selected value="01">01</option>
                      <option value="02">02</option>
                      <option value="03">03</option>
                      <option value="04">04</option>
                      <option value="05">05</option>
                      <option value="06">06</option>
                      <option value="07">07</option>
                      <option value="08">08</option>
                      <option value="09">09</option>
                    <%
                      for(int i=10;i<32;i++)
                      {
                      out.println("<option>"+i+"</option>");
                      }
                    %>
                    </select>
                    </td>
                  <td bgColor="#e5e6d3" class="p2">此项信息用以找回密码,请如实填写</td>
                </tr>
                <tr>
                  <td align="right" class="p2"><font color="#ff9933">*</font> 
                    性别</td>
                  <td bgColor="#e5e6d3" class="p1"><font size="2">&nbsp;&nbsp;&nbsp;</font><input name="XB" type="radio" value="男"> 
                    男 <input name="XB" type="radio" value="女"> 女</td>
                  <td bgColor="#e5e6d3" class="p2"> </td>
                </tr>
                <tr>
                  <td align="right" class="p2"> 电子邮箱</td>
                  <td bgColor="#e5e6d3"><font size="2">&nbsp;&nbsp;&nbsp;</font><input type="text" maxLength="20" name="email" size="25"></td>
                  <td bgColor="#e5e6d3" class="p2">请输入您常用的其它电子邮箱</td>
                </tr>
                <tr>
                  <td align="right" class="p2"> 
                    联系电话</td>
                  <td bgColor="#e5e6d3"><font size="2">&nbsp;&nbsp;&nbsp;</font><input type="text" maxLength="15" name="DH" size="25"></td>
                  <td bgColor="#e5e6d3" class="p2">请输入区号和真实的电话,以便我们与您联系</td>
                </tr>
                <tr>
                  <td align="right" class="p2"><font color="#ff9933">*</font> 
                    所在省份</td>
                  <td bgColor="#e5e6d3" class="p1"><font size="2">&nbsp;&nbsp;&nbsp;</font>
                  <select name="DQ">
                      <option selected value>请选择  </option>
                      <option value="北京">北京</option>
                      <option value="辽宁">辽宁</option>
                      <option value="广东">广东</option>
                      <option value="浙江">浙江</option>
                      <option value="江苏">江苏</option>
                      <option value="山东">山东</option>
                      <option value="四川">四川</option>
                      <option value="黑龙江">黑龙江</option>
                      <option value="湖南">湖南</option>
                      <option value="湖北">湖北</option>
                      <option value="上海">上海</option>
                      <option value="福建">福建</option>
                      <option value="陕西">陕西</option>
                      <option value="河南">河南</option>
                      <option value="安徽">安徽</option>
                      <option value="重庆">重庆</option>
                      <option value="河北">河北</option>
                      <option value="吉林">吉林</option>
                      <option value="江西">江西</option>
                      <option value="天津">天津</option>
                      <option value="广西">广西</option>
                      <option value="山西">山西</option>
                      <option value="内蒙古">内蒙古</option>
                      <option value="甘肃">甘肃</option>
                      <option value="贵州">贵州</option>
                      <option value="新疆">新疆</option>
                      <option value="云南">云南</option>
                      <option value="宁夏">宁夏</option>
                      <option value="海南">海南</option>
                      <option value="青海">青海</option>
                      <option value="西藏">西藏</option>
                      <option value="港澳台">港澳台</option>
                      <option value="海外">海外</option>
                      <option value="其它">其它</option>
                    </select></td>
                  <td bgColor="#e5e6d3" class="p1" vAlign="top"> </td>
                </tr>
                <tr>
                  <td class="p2"></td>
                </tr>
                    <br>
                    </font></td>
                </tr>
              </tbody>
            </table>
            <p> <br>
            <br>
            <div align="center">
              <input type="Submit" value="提 交">&nbsp;&nbsp;<input type="reset" value="重 置"><br>
            </div>
           </form>
        </tr>
        
      <tr>
        <td align="middle" bgColor="#ccccff" height="1" width="80%">
       <%@ include file = "botton.html" %>
        </td>
      </tr>
    </tbody>
  </table>
</div>
</body>
</html>

⌨️ 快捷键说明

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