第七周

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>注册界面</title>
    <link rel="stylesheet" href="layui/css/one.css">
    <link rel="stylesheet" href="css/two.css">
</head>
<body>
<div class="wrap">
    <img src="img/timg.png" class="imgStyle">
    <div class="loginForm">
        <form action="registerget.jsp" method="POST">
            <div class="logoHead">
            </div>
            <div class="usernameWrapDiv">
                <div class="usernameLabel">
                    <label>用户名:</label>
                </div>
                <div class="usernameDiv">
                    <i class="layui-icon layui-icon-username adminIcon"></i>
                    <input id="loginUsername" class="layui-input adminInput" type="text" name="name"
                           placeholder="输入用户名">
                </div>
            </div>
            <div class="usernameWrapDiv">
                <div class="usernameLabel">
                    <label>密码:</label>
                </div>
                <div class="passwordDiv">
                    <i class="layui-icon layui-icon-password adminIcon"></i>
                    <input id="loginPassword" class="layui-input adminInput" type="password" name="password" placeholder="输入密码">
                </div>
            </div>
            <div class="usernameWrapDiv">
                <div class="usernameLabel">
                    <label>确认密码:</label>
                </div>
                <div class="passwordDiv">
                    <i class="layui-icon layui-icon-password adminIcon"></i>
                    <input id="" class="layui-input adminInput" type="password" placeholder="输入密码">
                </div>
            </div>
            <div class="usernameWrapDiv">
                <div class="submitLabel">
                    <label>         </label>
                </div>
                <div class="submitDiv"><input id="loginBtn" type="submit" class="submit layui-btn layui-btn-primary" value="登录">
                </div>
            </div>
        </form>
    </div>
</div>
 
</body>
</html>

  

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page language="java" import="java.util.*"%>
<%@page import="com.jjy.dao.jspdataDao"%>
<%@page import="com.jjy.bean.jspdata"%>
<html>
<head>
    <title>注册信息收集界面</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    jspdata u= new jspdata();
    String uname = request.getParameter("name");uname.trim();
    u.setUname(uname);
    String upwd = request.getParameter("password");upwd.trim();
    u.setUpwd(upwd);
    jspdataDao sd=new jspdataDao();
    if(sd.addUers(u)>0){
        %><p>注册成功:<%=uname%></p><a href="index.jsp"><button>去登陆</button></a>
<%
    }else{%> <p>输入错误,请重新注册</p><a href="register.jsp"><button>返回注册界面</button></a>
<%
    }
%>
</body>
</html>

  

posted @ 2021-04-18 21:41  慕云云尊圣  阅读(31)  评论(0编辑  收藏  举报