本人是一个新手,大虾门,能教我怎么做吗? 你看我的代码是否那里错了.注册页面的代码.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sqltext="select * from RegUser where UserId='" & request.form("uid") & "'"
rs.open sqltext,conn,1,1
'查找数据库,检查用户名是否已经注册过
if rs.recordcount >= 1 then 
   if rs("userid")=request.form("uid") then
      Response.Redirect "loginsb.asp?msg=此用户名已经注册过,请选用其他用户名!"
      response.end
      rs.close
   end if
end if
%>
<head>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=javascript id=clientEventHandlersJS>
file://函数名:chksafe
file://功能介绍:检查是否含有"'",'\\',"/"
file://参数说明:要检查的字符串
file://返回值:0:是  1:不是
function chksafe(a)
{ 
 return 1;
/* fibdn = new Array ("'" ,"\\", "、", ",", ";", "/");
 i=fibdn.length;
 j=a.length;
 for (ii=0;ii<i;ii++)
 { for (jj=0;jj<j;jj++)
  { temp1=a.charAt(jj);
   temp2=fibdn[ii];
   if (tem';p1==temp2)
   { return 0; }
  }
 }
 return 1;
*/ 
}
file://函数名:chkspc
file://功能介绍:检查是否含有空格
file://参数说明:要检查的字符串
file://返回值:0:是  1:不是
function chkspc(a)
{
 var i=a.length;
 var j = 0;
 var k = 0;
 while (k<i)
 {
  if (a.charAt(k) != " ")
   j = j+1;
  k = k+1;
 }
 if (j==0)
 {
  return 0;
 }
 
 if (i!=j)
 { return 2; }
 else
 {
  return 1;
 }
}
file://函数名:chkemail
file://功能介绍:检查是否为Email Address
file://参数说明:要检查的字符串
file://返回值:0:不是  1:是
function chkemail(a)
{ var i=a.length;
 var temp = a.indexOf('@');
 var tempd = a.indexOf('.');
 if (temp > 1) {
  if ((i-temp) > 3){
   
    if ((i-tempd)>0){
     return 1;
    }
   
  }
 }
 return 0;
}
file://opt1 小数     opt2   负数
file://当opt2为1时检查num是否是负数
file://当opt1为1时检查num是否是小数
file://返回1是正确的,0是错误的
function chknbr(num,opt1,opt2)
{
 var i=num.length;
 var staus;
file://staus用于记录.的个数
 status=0;
 if ((opt2!=1) && (num.charAt(0)=='-'))
 {
  file://alert("You have enter a invalid number.");
  return 0;
 
 }
file://当最后一位为.时出错
 if (num.charAt(i-1)=='.')
 {
  file://alert("You have enter a invalid number.");
  return 0;
 }
 for (j=0;j<i;j++)
 {
  if (num.charAt(j)=='.')
  {
   status++;
  }
  if (status>1) 
  {
  file://alert("You have enter a invalid number.");
  return 0;  
  }
  if (num.charAt(j)<'0' || num.charAt(j)>'9' )
  {
   if (((opt1==0) || (num.charAt(j)!='.')) && (j!=0)) 
   {
    file://alert("You have enter a invalid number.");
    return 0;
   }
  }
 }
 return 1;
}
file://函数名:chkdate
file://功能介绍:检查是否为日期
file://参数说明:要检查的字符串
file://返回值:0:不是日期  1:是日期
function chkdate(datestr)
{
 var lthdatestr
 if (datestr != "")
  lthdatestr= datestr.length ;
 else
  lthdatestr=0;
  
 var tmpy="";
 var tmpm="";
 var tmpd="";
 file://var datestr;
 var status;
 status=0;
 if ( lthdatestr== 0)
  return 0
 for (i=0;i<lthdatestr;i++)
 { if (datestr.charAt(i)== '-')
  {
   status++;
  }
  if (status>2)
  {
   file://alert("Invalid format of date!");
   return 0;
  }
  if ((status==0) && (datestr.charAt(i)!='-'))
  {
   tmpy=tmpy+datestr.charAt(i)
  }
  if ((status==1) && (datestr.charAt(i)!='-'))
  {
   tmpm=tmpm+datestr.charAt(i)
  }
  if ((status==2) && (datestr.charAt(i)!='-'))
  {
   tmpd=tmpd+datestr.charAt(i)
  }
 }
 year=new String (tmpy);
 month=new String (tmpm);
 day=new String (tmpd)
 file://tempdate= new String (year+month+day);
 file://alert(tempdate);
 if ((tmpy.length!=4) || (tmpm.length>2) || (tmpd.length>2))
 {
  file://alert("Invalid format of date!");
  return 0;
 }
 if (!((1<=month) && (12>=month) && (31>=day) && (1<=day)) )
 {
  file://alert ("Invalid month or day!");
  return 0;
 }
 if (!((year % 4)==0) && (month==2) && (day==29))
 {
  file://alert ("This is not a leap year!");
  return 0;
 }
 if ((month<=7) && ((month % 2)==0) && (day>=31))
 {
  file://alert ("This month is a small month!");
  return 0;
 
 }
 if ((month>=8) && ((month % 2)==1) && (day>=31))
 {
  file://alert ("This month is a small month!");
  return 0;
 }
 if ((month==2) && (day==30))
 {
  file://alert("The Febryary never has this day!");
  return 0;
 }
 
 return 1;
}
file://函数名:fucPWDchk
file://功能介绍:检查是否含有非数字或字母
file://参数说明:要检查的字符串
file://返回值:0:含有 1:全部为数字或字母
function fucPWDchk(str)
{
  var strSource ="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
  var ch;
  var i;
  var temp;
  
  for (i=0;i<=(str.length-1);i++)
  {
  
    ch = str.charAt(i);
    temp = strSource.indexOf(ch);
    if (temp==-1) 
    {
     return 0;
    }
  }
  if (strSource.indexOf(ch)==-1)
  {
    return 0;
  }
  else
  {
    return 1;
  } 
}
function jtrim(str)
{     while (str.charAt(0)==" ")
          {str=str.substr(1);}      
     while (str.charAt(str.length-1)==" ")
         {str=str.substr(0,str.length-1);}
     return(str);
}
file://函数名:fucCheckNUM
file://功能介绍:检查是否为数字
file://参数说明:要检查的数字
file://返回值:1为是数字,0为不是数字
function fucCheckNUM(NUM)
{
 var i,j,strTemp;
 strTemp="0123456789";
 if ( NUM.length== 0)
  return 0
 for (i=0;i<NUM.length;i++)
 {
  j=strTemp.indexOf(NUM.charAt(i)); 
  if (j==-1)
  {
  file://说明有字符不是数字
   return 0;
  }
 }
 file://说明是数字
 return 1;
}
file://函数名:fucCheckTEL
file://功能介绍:检查是否为电话号码
file://参数说明:要检查的字符串
file://返回值:1为是合法,0为不合法
function fucCheckTEL(TEL)
{
 var i,j,strTemp;
 strTemp="0123456789-()# ";
 for (i=0;i<TEL.length;i++)
 {
  j=strTemp.indexOf(TEL.charAt(i)); 
  if (j==-1)
  {
  file://说明有字符不合法
   return 0;
  }
 }
 file://说明合法
 return 1;
}
file://函数名:fucCheckLength
file://功能介绍:检查字符串的长度
file://参数说明:要检查的字符串
file://返回值:长度值
function fucCheckLength(strTemp)
{
 var i,sum;
 sum=0;
 for(i=0;i<strTemp.length;i++)
 {
  if ((strTemp.charCodeAt(i)>=0) && (strTemp.charCodeAt(i)<=255))
   sum=sum+1;
  else
   sum=sum+2;
 }
 return sum;
}
</SCRIPT>
<SCRIPT language=javascript>
function enb1()
{
 if (document.form1.countryid.value!=1)
 {
  document.form1.provinceid.disabled=true;
  document.form1.cityid.disabled=true;
  document.form1.haddr.value="";
 }
 else
 {
  document.form1.provinceid.disabled=false;
  document.form1.cityid.disabled=false;
 }
}
function ctychg()
{ 
 document.form1.methodflag.value = "1";
 document.form1.action = "mbrregdetail.asp" ; 
 document.form1.submit();
}
</SCRIPT>
<SCRIPT language=javascript id=clientEventHandlersJS>
<!--
function form1_onsubmit() 
{
 if (document.form1.methodflag.value == "1")// || document.form1.methodflag.value == "3")
 {
  document.form1.action = "mbrregdetail.asp"
 }
 else
 { document.form1.action = "reguser3.asp"
 
 if (chkspc(document.form1.name.value)==0)
 { alert("请填写您的姓名。");
  document.form1.name.focus();
  return false;
 }
 
 if ((window.form1.sex[0].checked == 0)  &&  (window.form1.sex[1].checked == 0  ))
 { alert("请选择您的性别。");
  return false;
 }
 
 if ((chksafe(document.form1.name.value)==0)||(fucCheckLength(document.form1.name.value)>20))
 { alert("请填写正确的姓名。");
  document.form1.name.focus();
  return false;  
 }
 
 if (fucCheckLength(document.form1.pwd.value)<4) 
 { alert("密码必须大于4位")
  document.form1.pwd.focus();
  return false;
 }
 
 if ((chksafe(document.form1.pwd.value)==0)||(fucCheckLength(document.form1.pwd.value)>18))
 { alert("请填写正确密码。")
  document.form1.pwd.focus();
  return false;  
 }
 
 
 if (document.form1.PasswordConfirm.value!=document.form1.pwd.value)
 {
  alert ("请确认您的密码。");
  document.form1.PasswordConfirm.value='';    
  document.form1.pwd.value='';
  document.form1.pwd.focus();
  return false;
 }
 
/* if (fucCheckLength(document.form1.aliasname.value)>20)
 { alert("您填写的昵称超长。");
  document.form1.aliasname.focus();
  return false;  
 }
 if (chksafe(document.form1.aliasname.value)==0)
 { alert("请填写正确的昵称。");
  document.form1.alians.focus();
  return false;  
 }*/
  
 if (chkspc(document.form1.question.value)==0)
 { alert("请填写您的密码提问。");
  document.form1.question.focus();
  return false;
 }
 if ((chksafe(document.form1.question.value)==0)||(fucCheckLength(document.form1.question.value)>50))
 { alert("请填写正确的密码提问。");
  document.form1.question.focus();
  return false;  
 }
 if (fucCheckLength(document.form1.answer.value)<4) 
 { alert("提示问题答案必须大于4位")
  document.form1.answer.focus();
  return false;
 }
 if (chkspc(document.form1.answer.value)==0)
 { alert("请填写密码提示问题答案。");
  document.form1.answer.focus();
  return false;
 }
 if ((chksafe(document.form1.answer.value)==0)||(fucCheckLength(document.form1.answer.value)>50))
 { alert("请填写正确的密码提示问题答案。");
  document.form1.answer.focus();
  return false;  
 }
 
 /*if ((chkspc(document.form1.birthday.value)!=0) && (chkdate(document.form1.birthday.value)==0))
 { alert ("请填写合法的日期。");
  document.form1.birthday.focus();
  return false;
 }
 if (chksafe(document.form1.birthday.value)==0)
 { alert ("请填写合法的日期。");
  document.form1.birthday.focus();
  return false;  
 }*/
 if ((chkspc(document.form1.email.value)==0) || (chkemail(document.form1.email.value)==0))
 { alert ("请填写正确的e-mail地址。");
  document.form1.email.focus();
  return false;
 }
 if ((chksafe(document.form1.email.value)==0)||(fucCheckLength(document.form1.email.value)>40))
 { alert ("请填写正确的e-mail地址。");
  document.form1.email.focus();
  return false;  
 }
/* if (chkspc(document.form1.certifierno.value)==0)
 { alert ("请填写您的证件号码。");
  document.form1.certifierno.focus();
  return false;
 }
 
 if ((chksafe(document.form1.certifierno.value)==0)||(fucCheckLength(document.form1.certifierno.value)>30))
 { alert ("请填写正确的证件号码。");
  document.form1.certifierno.focus();
  return false;  
 }
*/ 
 if (chkspc(document.form1.haddr.value)==0)
 { alert ("请填写您的收货地址。");
  document.form1.haddr.focus();
  return false;
 }
 if ((chksafe(document.form1.haddr.value)==0)||(fucCheckLength(document.form1.haddr.value)>200))
 { alert ("请填写正确的收货地址。");
  document.form1.haddr.focus();
  return false;  
 }
 if (chkspc(document.form1.postcode.value)==0)
 { alert ("请您填写邮政编码。");
  document.form1.postcode.focus();
  return false;
 }
 if ((chksafe(document.form1.postcode.value)==0)||(fucCheckLength(document.form1.postcode.value)>15))
 { alert ("请填写正确的邮政编码。");
  document.form1.postcode.focus();
  return false;  
 }
 /*if ((chksafe(document.form1.oname.value)==0)||(fucCheckLength(document.form1.oname.value)>200))
 { alert ("请填写正确的单位名称。");
  document.form1.oname.focus();
  return false;   
 }
 if ((chksafe(document.form1.opostcode.value)==0)||(fucCheckLength(document.form1.opostcode.value)>15))
 { alert ("请填写正确的单位邮编。");
  document.form1.oname.focus();
  return false;   
 }
 if ((chksafe(document.form1.oaddr.value)==0)||(fucCheckLength(document.form1.oaddr.value)>200))
 { alert ("请填写正确的单位地址。");
  document.form1.oname.focus();
  return false;   
 }
 
 if ((chksafe(document.form1.position.value)==0)||(fucCheckLength(document.form1.oaddr.value)>200))
 { alert ("请填写正确的职务。");
  document.form1.position.focus();
  return false;   
 }
 if ((fucCheckLength(document.form1.ophone.value)>30)||(fucCheckTEL(document.form1.ophone.value)==0))
 { alert("您的办公电话号码填写有误。");
  document.form1.ophone.focus();
  return false;   
 }
// if (chksafe(document.form1.hphone.value)==0)
// { document.form1.hphone.focus();
//  return false;   
// }
// if ((document.form1.hphone.value=='') || (chkspc(document.form1.hphone.value)==0) || (fucCheckLength(document.form1.hphone.value)>30)||(fucCheckTEL(document.form1.hphone.value)==0))
// {
//  alert("您的家庭电话号码填写有误。");
//  document.form1.hphone.focus();
//  return false;
// }
 if ((fucCheckLength(document.form1.mphone.value)>30)||(fucCheckTEL(document.form1.mphone.value)==0))
 {
  alert("您的移动电话号码填写有误。");
  document.form1.mphone.focus();
  return false;
 }
 if ((fucCheckLength(document.form1.bp.value)>30)||(fucCheckTEL(document.form1.bp.value)==0))
 {
  alert("您的BP填写有误。");
  document.form1.bp.focus();
  return false;
 }
 */
 
 if ((document.form1.usephone.value=='') || (chkspc(document.form1.usephone.value)==0) || (fucCheckLength(document.form1.usephone.value)>30)||(fucCheckTEL(document.form1.usephone.value)==0))
 {
  alert("您的常用电话号码填写有误。");
  document.form1.usephone.focus();
  return false;
 }
 
/* if ((document.form1.sex.item(0).checked==false)|| (document.form1.sex.item(1).checked==false))
 {
  alert("请填写您的性别");
  file://document.form1.sex.focus();
  return false;
 }
*/ 
 for (lgth=0;lgth<=document.form1.pwd.value.length;lgth++)
  { if ( (document.form1.pwd.value.charCodeAt(lgth)>128)  || (document.form1.pwd.value.charAt(lgth)=="'") )
   { alert("请不要输入中文密码或者单引号!");
    document.form1.pwd.focus();
    return false;
   }
  }
  
 
 }
 
}
function cityChange(p)
{
 /*document.form1.methodflag.value = "3";
 document.form1.action = "mbrregdetail.asp" ; 
 document.form1.submit();*/
 file://alert(getCityName(p));
 document.form1.haddr.value=document.form1.prvname.value+getCityName(p);
 file://alert(CityArray[0].name);
 file://alert(p);
// ctychg();
}
function magazine51go_onclick() {
 if  (form1.magazine51go.checked == true ) tr_51go.style.display="";
 else tr_51go.style.display="none";
}
file://-->
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>zhuc</title>
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
<link rel="stylesheet" type="text/css" href="style.css">
</HEAD>
<body bgColor=#ffffff>
<DIV align=center>
<TABLE cellSpacing=0 cellPadding=0 width=750>
  <TBODY>
  <TR>
    <TD height=62>
      <DIV align=center><BR>
        <h2>您好!</h2>
      <FORM language=javascript name=form1 onsubmit="return form1_onsubmit()" 
      method=post>  <INPUT type=hidden value=<%=request.form("uid")%> <INPUT type=hidden value=2 
      name=methodflag> 
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td width="100%">
              <p style="line-height: 150%">    
              为了我们更好的为您服务,更准确及时的将您订购的商品送到您的手中和与您联系,请您务必详细填写您的信息,并核对无误;      
            国内用户请留下您的真实中文姓名。 请放心:您的资料未经您的允许,我们将只用于处理您的订货信息,对外保密。      
            (带*号为必填项)</p>  
              <p> </td> 
          </tr> 
        </table> 
      <TABLE class=main cellSpacing=1 width=746 bgColor=#006699> 
        <TBODY> 
        <TR> 
          <TD  bgColor=#006699 colSpan=2 width="736"><FONT  
            color=#ffffff><B>注册信息:</B></FONT></TD></TR> 
        <TR> 
          <TD width=130 bgColor=#ffffff>您的会员帐号: </TD> 
          <TD bgColor=#ffffff width="598"><%=request.form("uid")%><BR>
            [这是您刚才选好的名字,若需要重新选取,可以点击“<A  
            href="reguser.htm">上一步</A>”。] </TD>
        </TR> 
        <TR> 
          <TD width=130 bgColor=#ffffff><FONT color=#e71c17>*</FONT>您的姓名:</TD> 
          <TD bgColor=#ffffff width="598"><INPUT maxLength=20 size=10 name=name>  
            <BR>[请留下您的真实姓名,便于我们与您的联系以及给您发货。] </TD></TR> 
        <TR> 
          <TD width=130 bgColor=#ffffff><FONT color=#000000><FONT  
            color=#e71c17>*</FONT>性别:</FONT></TD> 
          <TD bgColor=#ffffff width="598"><FONT color=#000000><INPUT id=sex  
            type=radio CHECKED value=男 name=sex> 男 <INPUT id=sex type=radio  
            value=女 name=sex> 女</FONT> </TD></TR> 
        <TR> 
          <TD width=130 bgColor=#ffffff><FONT color=#e71c17>*</FONT>密码:</TD> 
          <TD bgColor=#ffffff width="598"> 
            <P><FONT color=#000000><INPUT type=password maxLength=18 name=pwd>  
            </FONT><BR>[长度太小的密码很不安全,而长度太大的密码又不方便记忆,所以请您将密码的长度限制在4—16个字符之间。密码的组成元素只能是英文字母、数字、符号,例如:small2000、199707!等。]  
            </P></TD></TR> 
        <TR> 
          <TD width=130 bgColor=#ffffff><FONT color=#e71c17>*</FONT>密码确认:</TD> 
          <TD bgColor=#ffffff width="598"><FONT color=#000000><INPUT  
            type=password maxLength=18 name=PasswordConfirm>  
            <BR>[请您在“确认密码”方框中输入与“密码”相同的信息,这是为了防止设置密码时输入错误。] </FONT></TD></TR> 
        <TR> 
          <TD width=130 bgColor=#ffffff><FONT color=#e71c17>*</FONT>密码提问:</TD> 
          <TD bgColor=#ffffff width="598"><FONT color=#000000><INPUT  
            maxLength=50 size=40 name=question>  
            </FONT><BR>[如果您忘记密码,系统会提出此问题。选择一个容易勾起您的回忆的问题吧!] </TD></TR> 
        <TR> 
          <TD width=130 bgColor=#ffffff><FONT color=#e71c17>*</FONT>密码答案:</TD> 
          <TD bgColor=#ffffff width="598"><INPUT maxLength=50 size=40  
            name=answer> (密码遗忘时将验证此答案)    
            <BR>[此答案与前面的问题对应,当您忘记密码时,系统会根据您在这里设定的提示问题和答案帮助您重新设置密码。] </TD></TR>  
        <TR>  
          <TD width=130 bgColor=#ffffff><FONT color=#e71c17>*</FONT>E-MAIL:</TD>  
          <TD bgColor=#ffffff width="598"><INPUT maxLength=40 name=email>   
            <BR>[请您填上正确的电子邮件地址,这样我们才方便与您联系。<FONT   
            color=#ff0000>如果您有两个以上的邮箱,请只填写您最常用的一个邮箱地址。</FONT>] </TD></TR>  
        <TR>  
          <TD width=130 bgColor=#ffffff><FONT color=#e71c17>*</FONT>常用电话:</TD>  
          <TD bgColor=#ffffff width="598"><INPUT id=text5 maxLength=30   
            name=usephone> <BR>[请填写能随时联系到您的电话,以便你在购物时我们能随时与您取得联系。] </TD></TR>  
        <TR>  
          <TD width=130 bgColor=#ffffff><FONT color=#e71c17>*</FONT>收货地址:</TD>  
          <TD bgColor=#ffffff width="598"><INPUT maxLength=200 size=60 name=haddr> <BR>[请填写您能最直接收到购物的地址,以便我们能尽快将您购的物递交给您。]   
        </TD></TR>  
        <TR>  
          <TD width=130 bgColor=#ffffff><FONT color=#e71c17>*</FONT>邮编:</TD>  
          <TD bgColor=#ffffff width="598"><INPUT maxLength=15 name=postcode>   
        </TD></TR>  
        <TR>  
          <TD bgColor=#ffffff colSpan=2 width="736"></TD></TR>  
        <TR id=tr_51go style="DISPLAY: none" bgColor=#ffffff>  
          <TD  width=736 colSpan=2> </TD></TR></TBODY></TABLE><INPUT  type=submit value=确认 name=button1><INPUT  id=button2 type=reset value=重填 name=reset>   
      <BR></FORM></DIV></TD></TR></TBODY></TABLE>  
</DIV>
</body>
</html>
其CONN.ASP文件
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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=gb2312">
<title>无标题文档</title>
<%
   dim conn   
   dim connstr
   on error resume next
   connstr="DBQ="+server.mappath("tw9c45_data.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
   set conn=server.createobject("ADODB.CONNECTION")
   if err then 
     err.clear
   else
        conn.open connstr
        if err then 
           err.clear
        end if
   end if
%>
</head>
<body>
</body>
</html>
大虾知道我那里错了吗请帮忙指点~~~~~~ 为什么数据库接收不到数据呢

 
											





 
	    


