怎样实现注册功能?请求帮助!
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page contentType="text/html; charset=GB2312"%>
<%@ page import="com.bwm.page.Show"%>
<%@ page import="com.bwm.db.Data"%>
<%@ page import="com.bwm.time.Time"%>
<%request.setCharacterEncoding("GB2312");%>
<jsp:useBean id="sjob" scope="request" class="job.Sjob" />
<jsp:setProperty name="sjob" property="*" />
<%
Show show=new Show();
Data data=new Data();
Time time=new Time();
int intT=0;
String strName=(String)session.getAttribute("name");
intT=data.insert("INSERT INTO tb_sjob(sname,specialty,job,emolument,ptime,atime,other) VALUES('"+strName+"','"+
sjob.getSpecialty()+"','"+sjob.getJob()+"','"+sjob.getEmolument()+"','"+time.getYMD()+"','"+
sjob.getAtime()+"','"+sjob.getOther()+"')");
if(intT<=0){
out.print(show.errorBox("发布失败,你可能已经下线请新登录!","错误信息"));
return;
}else{
out.print("<script>alert('发布成功!');document.location='login.htm';</script>");
}
%>
<!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=gb2312" />
<title>发布招聘信息</title>
<style type="text/css">
<!--
.STYLE2 {font-size: 18px}
.STYLE5 {font-size: larger}
-->
</style>
<link href="file:///I|/xj/default.css" rel="stylesheet" type="text/css" />
</head>
<body bgcolor="#009966"><table width="200" height="675" border="0" align="center" bgcolor="#FFFFFF">
<tr>
<th height="221" scope="col"><img src="images/logo1.gif" width="932" height="217" /></th>
</tr>
<tr>
<td background="images/1283844723.jpg"><div align="right"><a href="main.jsp">返回首页</a></div></td>
</tr>
<tr>
<td height="427"><table width="935" height="419" border="0">
<tr>
<th width="200" height="415" scope="col"><table width="192" border="0">
<tr>
<th width="182" height="46" bgcolor="#99FF00" scope="col"><span class="STYLE2">基本信息管理</span></th>
</tr>
<tr>
<td height="41"><div align="center"><a href="reginfo.jsp">修改个人信息</a></div></td>
</tr>
<tr>
<td height="41" bgcolor="#99FF33"><div align="center" class="STYLE2">邮件管理</div></td>
</tr>
<tr>
<td height="31"><div align="center"><a href="email1.jsp">发送邮件</a></div></td>
</tr>
<tr>
<td height="62" bgcolor="#99FF33"><div align="center"><span class="STYLE2">发布信息管理</span></div></td>
</tr>
<tr>
<td height="83"><div align="center"><a href="vjobinfo.jsp">删除求职信息</a></div></td>
</tr>
<tr>
<td height="80"><div align="center"><a href="fqz.jsp">发送求职信息</a></div></td>
</tr>
</table></th>
<th width="719" scope="col"><table width="729" height="395" border="1" bordercolor="#999900">
<tr>
<th width="655" height="56" scope="col"><h1><span class="STYLE5">修改注册信息</span></h1></th>
</tr>
<tr>
<td height="328"><table width="720" height="238" border="0">
<tr align="center"> </tr>
<tr align="center">
<td height="27" width="655"colspan="2" bgcolor="#21536A"><div id="reg">发布求职信息</div></td>
</tr>
<tr>
<td height="22" align="center"> <div align="center">求职行业:</div></td>
<td width="300" align="left"><input type="text" name="specialty" value="不详" /></td>
</tr>
<tr>
<td height="22" align="center"><div align="center">所求职位:</div></td>
<td align="left"><input type="text" name="job" /></td>
</tr>
<tr>
<td height="22" align="center">所求薪水:</td>
<td align="left"><input type="text" name="emolument" value="面议" /></td>
</tr>
<tr>
<td height="22" align="center">有效时间:</td>
<td align="left"><input type="text" name="atime" />
年-月-日</td>
</tr>
<tr>
<td width="200" height="22" align="center"> 其他说明:</td>
<td width="300" align="left"><textarea name="other" cols="35" rows="5">无</textarea></td>
</tr>
<tr align="center">
<td height="35" colspan="2"><input type="submit" name="Submit" value="发布" />
<input type="reset" name="Reset" value="重置" /></td>
</tr>
</table></td>
</tr>
</table></th>
</tr>
</table></td>
</tr>
</table>
<%
}else{
out.print(show.errorBox("数据库错误,请重新登录!","错误信息"));
}
%>
</body>
</html>
--------------------编程问答-------------------- 错误代码贴出来看看的,我感觉你的sql语句写的有问题,int sum=ResultSet.getCount();
补充:Java , Web 开发