日期:2014-05-17  浏览次数:21070 次

程序写错哪里呀???超难!!
<!--#include   file= "conn/opendb.asp "-->
<%  
              function   checknull(e)
                    if   e=null   then  
    e= " "
    end   if
                end   function
'====================
nick=request( "nick ")
'如果nick不为空值
if   nick <> " "   then
'打开数据库查找是否有此用户
set   rs=server.createobject( "adodb.recordset ")
sql= "select   *   from   users   where   nick= ' "   &   nick   &   " '   "
rs.open   sql,conn,1,3
'如果有此用户就进入系统
if   not   rs.eof   and   not   rs.bof   then
response.write   "alert( '你的昵称已被别人注册了! '); "
end   if
else
'==========================
        '   if   Request.ServerVariables( "Request_Method ")   =   "POST "   then
                  'Request.ServerVariables( "Request_Method ")   =   "POST "  
                  set   rs=server.createobject( "adodb.recordset ")
  rs.open   "users ",conn,1,3
  rs.addnew
                  rs( "nick ")=request( "nick ")
  rs( "pass ")=request( "pass ")
  rs( "sex ")=request( "sex ")
  rs( "tyear ")=checknull(request( "tyear "))
  rs( "tmonth ")=checknull(request( "tmonth "))
  rs( "tday ")=checknull(request( "tday "))
  rs( "email ")=checknull(request( "email "))
  rs( "tfrom ")=checknull(request( "from "))
  rs( "work ")=checknull(request( "work "))
  rs( "like ")=checknull(request( "like "))
  rs( "icon ")=request( "tTX ")
  rs( "tGXQM ")=checknull(request( "tGXQM "))
  rs( "name ")=request( "name ")
  rs( "tel ")=request( "tel ")
  rs( "idpath ")=checknull(request( "idpath "))
  rs( "qq ")=request( "qq ")
  rs( "hpage ")=checknull(request( "hpage "))
  rs( "address ")=checknull(request( "address "))
  rs( "info ")=checknull(request( "info "))
  rs.update

 
                        Response.Write( " <SCRIPT   LANGUAGE=javascript> "&Chr(13)&Chr(10))
                        Response.Write( " <!-- "&Chr(13)&Chr(10))
                        Response.Write( "l   =   screen.width/2-150; "&Chr(13)&Chr(10))
                    &nbs