<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>加入会员</title> </head>
<style type="text/css"> <!-- body { background-color: #F2F2F2; } --> </style><table width="639" height="374" border="0" align="center"> <form action="hhh.asp" method="post" name="form1">
<tr> <td colspan="2"><div align="center"><strong>会员注册系统</strong></div></td> <tr> <td width="85"><p>用户*</p></td> <td width="544"><input type="text" name="id" size="20" value="<%=id%>"> *请用英文和数字(例如:aa123)</td> <tr> <td><p>密码*</p></td> <td><input type="password" name="password" size="20" value="<%=password%>"> *(密码不能少于10个字符)</td> </tr> <tr> <td><p>确认密码*</p></td> <td><input type="password" name="repassword" size="20" value="<%=repassword%>"> * </td> </tr> <tr> <td><p>性别*</p></td> <td> 男 <input type="radio" name="sex" value="<%=sex%>"checked> 女 <input type="radio" name="sex" value=<%=sex%>> * </td> </tr> <tr> <td><p>真实姓名*</p></td> <td><input type="text" name="name" size="20" value=<%=name%>> *(务必填写真实姓名,方便我们联系)</td> </tr> <tr> <td height="24">EMAIL:</td> <td><input type="text" name="email" size="20" value=<%=email%>> (请填写真实有效的EMAIL)</td> </tr> <tr> <td height="24">联系电话;</td> <td> <input type="text" name="tel" size="20" value=<%=tel%>></td> </tr> <tr> <td height="24"><p>年龄</p></td> <td><input type="text" name="age" size="20"> </td></tr> <tr> <td><p>住址</p></td> <td><input type="text" name="adr" size="20"> </td> </tr> <tr> <td><p>您的职业</p></td> <td><input type="text" name="work" size="20"> </td> </tr> <tr> <td height="57"><p>您最想说的一句话:</p></td> <td> <div align="left"> <textarea name="textarea"></textarea> 感谢您的填写,请按“提交”按钮 </div></td> </tr> <tr> <td height="15"> </td> <td><input type="submit" name="Submit" value="提交"> <input type="reset" name="reset" value="重新填写"></td> </tr> </form> </table>
这是一个用户注册的页面,后面我再给出定义这个页面的语句:
<!--#include file=conn.asp--> <%if request.Form("password")<>request.Form("repassword") then%> <script language=vbscript> msgbox"两次密码不同,请核对!" history.go(-1) </script> <%response.end end if%> <%if len("id")>2 and request.Form("password")<>""and request.Form("sex")<>"" and request.Form("name")<>"" then sql="select * from date where id='"&request("id")&"'" rs.open sql,conn,2,2 if rs.eof then rs.addnew rs("id")=request.Form("id") rs("password")=request.Form("password") rs("repassword")=request.Form("repassword") rs("sex")=request.Form("sex") rs("name")=request.Form("name") rs("email")=request.Form("email") rs("tel")=request.Form("tel") rs("age")=request.Form("age") rs("adr")=request.Form("adr") rs.update response.write "注册成功!欢迎登陆!"%> <meta http-equiv="refresh" content="1;url=ddd.asp;%20charset=gb2312"> <% else response.write "用户名已被占用,请重新输入"%> <meta http-equiv="refresh" content="1;url=aaa.asp; charset=gb2312"> <%rs.close set conn=nothing end if%> <% else response.write "带*为必填项"%> <a href="javascript:history.go(-1)">返回检测</a>
<% end if %>
不知道为什么老是不显示注册成功的信息,而只显示 带*为必添项,返回检测 这个页面,请教各位大侠,添完点提交不会出现错误信息,就显示我说的那个页面!
那位能帮着解决一下!谢!qq:149758237 群:6224109