【JSP开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了JSP开源代码-addsave.jsp的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
<%@ include file="conn.jsp"%>
<%String sql;
String id=request.getParameter("id");
String psw=request.getParameter("psw");
String email=request.getParameter("email");
String name=request.getParameter("name");
String face=request.getParameter("face");
String homepage=request.getParameter("homepage");
String college=request.getParameter("college");
String qq=request.getParameter("qq");
String tel=request.getParameter("tel");
String addr=request.getParameter("addr");
String sex=request.getParameter("sex");
String huiyuan=request.getParameter("huiyuan");
String part=request.getParameter("part");
String class1=request.getParameter("class");
if(!id.equals("")&&!psw.equals("")&&!email.equals("")&&!name.equals("")){
sql="select * from scott.uers where id= '" + id + "'";
ResultSet rst=stmt.executeQuery(sql);
if(!rst.next()) {
session.putValue("AdminUID",id);
session.putValue("AdminPWD",psw);
session.putValue("face",face);
session.putValue("Adminflag","");
stmt1.executeUpdate("INSERT INTO scott.uers(id,psw,sex,qq,email,homepage,huiyuan,part,name,class,tel,face,addr,college,dengji) VALUES('"+id+"','"+psw+"','"+sex+"','"+qq+"','"+email+"','"+homepage+"','"+huiyuan+"','"+part+"','"+name+"','"+class1+"','"+tel+"','"+face+"','"+addr+"','"+college+"',0)");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>成功!!!</title><meta http-equiv="refresh" content="3;URL=uerparticle.jsp?id=<%=id%>">
<style type="text/css">
<!--
a:visited{text-transform: none; text-decoration: none; font-style: normal; font-weight: normal; font-variant: normal; color: #000000}
a:hover{text-decoration:underline; color: #FF3333}
a:link{text-transform: none; text-decoration: none; font-weight: normal; font-variant: normal; color: #000000}
.p9 { font-size: 9pt; line-height: 13pt; text-decoration: none}
-->
</style>
</head>
<body>
<p> </p>
<table width="348" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF">
<tr class="p9">
<td width="338" height="24" align="center" background="pic/bg_re.gif"><font size="+1">注册</font><font size="+1">成功!</font></td>
</tr>
<tr align="center" class="p9">
<td> </td>
</tr>
<tr class="p9">
<td height="17" align="center"><a href="index.jsp">恭喜你,你注册成功!三秒后将自动返回你的资料</a></td>
</tr>
<tr>
<td height="18" align="center" class="p9"><a href="index.jsp">如果你不想等待,请点击这里</a></td>
</tr>
<tr>
<td height="18" align="center"> </td>
</tr>
</table>
</body>
</html>
<%
}else{
out.print("<script language='javascript'>window.confirm('用户名已被注册,请改名');</script>");
out.print("<script language='javascript'>parent.window.history.go(-1);</script>");
}
}else{
out.print("<script language='javascript'>window.confirm('请填写一定要打**的内容!');</script>");
out.print("<script language='javascript'>parent.window.history.go(-1);</script>");
}
%>
上一篇:
Addroes.jsp
下一篇:
餐饮管理系统