<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <%@ page import="deal.DataDao" %> <%@ page import="origin.Data" %><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Insert title here</title></head><body><% String path=request.getContextPath(); String basePath=request.getScheme()+"//"+request.getServerName()+":"+request.getServerPort()+path+"/"; request.setCharacterEncoding("utf-8");//防止中文乱码 DataDao dao2=new DataDao(); String ashes =request.getParameter("AS"); if(!(dao2.findpsw(ashes)).equals("ashesnotexist")){ dao2.deleteAshes(ashes); } //审核验证并保存一致的密码 String K1 =request.getParameter("K1"); String K2 =request.getParameter("K2"); String DieKey =""; if(K1.equals(K2)){ DieKey=K2; }else { response.sendRedirect("registerNO.jsp"); } //考虑到性别存在多种可能,选用了switch方法处理 int i=0,s=0; String sex1=request.getParameter("sex1"); String sex2=request.getParameter("sex2"); if("null".equals(sex1)&&"null".equals(sex2))i=1; if("on".equals(sex1)&&"null".equals(sex2))i=2; if("null".equals(sex1)&&"on".equals(sex2))i=3; if("on".equals(sex1)&&"on".equals(sex2))i=4; switch(i){ case 1:s=0;break; case 2:s=1;break; case 3:s=2;break; case 4:s=3;break; default:System.out.println("SEX ERROR");; } //———————————————————————————————————————————————————————————————————————————————下面开始JDBC操作 Data dt1=new Data(); DataDao dao1=new DataDao(); // dt1.setAshes(ashes); dt1.setDieKey(DieKey); dt1.setSex(s); dt1.setInformation(request.getParameter("IFMT")); // dao1.addGoddess(dt1); // System.out.println(request.getParameter("AS"));%><!-- //提醒用户不要忘记账号&密码 -->Your NMB name is: <%=ashes %><br>And your Fucking DieKey:<%=DieKey %><br>(NOT Fucking TO forget it!!shit of bitch!)<br> How you want to die. <br><hr> <a href="login.jsp">登录NMB </a>     <a href="index.jsp">返回首页 </a><br><br> <a href="register.jsp">再注册一个NMB </a>%></body></html>
添加回答
举报
0/150
提交
取消