| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 428 人关注过本帖
标题:[求助]在做一个asp会员注册系统,可是总是提示帐号重复.
只看楼主 加入收藏
管理者
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-11-12
收藏
 问题点数:0 回复次数:2 
[求助]在做一个asp会员注册系统,可是总是提示帐号重复.

源码

<!--#include file="sub/sjlj.asp"-->
<!--#include file="sub/fun.asp"-->
<%
function changechr(str)
changechr=replace(replace(replace(replace(str,"<","&lt;"),">","&gt;"),chr(13),"<br>")," "," ")
changechr=replace(changechr,"'","‘")
changechr=replace(changechr,mid(" "" ",2,1),"&quot;")
end function

function GenID()
fname = now()
fname = replace(fname,"-","")
fname = replace(fname," ","")
fname = replace(fname,":","")
fname = replace(fname,"PM","")
fname = replace(fname,"AM","")
fname = replace(fname,"上午","")
fname = replace(fname,"下午","")
GenID = fname
end function

Name=changechr(trim(request("Name")))
If name="" Then
response.write "<script>alert('商店名不能为空!请返回!');history.back();</script>"
response.end
end if

Password = changechr(trim(request("Password")))
username = changechr(trim(request("username")))
if Password="" or username="" then
call msg("管理员密码和管理员账号不能为空!请返回!","-1")
end if

set rs = conn.execute("Select * From user Where manageid ='"&username&"'")
if not rs.eof then
call msg("此帐号已经有人使用!请返回!","-1")
end if
rs.close
set rs = nothing


ManageId = username
on error resume next

CityID =cint(request("CityID"))
DistrictID =cint(request("DistrictID"))
AreaID =cint(request("AreaID"))


Address = changechr(trim(request("Address")))
Telephone = changechr(trim(request("Telephone")))
qq = changechr(trim(request("qq")))
TimePeriod = changechr(trim(request("TimePeriod")))
JiaoTong = changechr(trim(request("JiaoTong")))
Website = changechr(trim(request("Website")))
Email = changechr(trim(request("Email")))
Recommendation = changechr(trim(request("Recommendation")))
Addtime = changechr(trim(request("Addtime")))
Intro = changechr(trim(request("Intro")))
DefaultPicUrl=changechr(trim(request("DefaultPicUrl")))

If name="" or name="admin" Then
call msg("商店名有错误!请返回!","-1")
end if
set rs=server.createobject("adodb.recordset")
sql="select * from User"
rs.open sql,conn,1,3
rs.addnew
rs("ManageId") = ManageId
rs("Password") = Password
rs("Name") = Name
rs("CompanyLevelID")= 1 '免费
rs("CityID") = CityID
rs("DistrictID")= DistrictID
rs("AreaID") = AreaID
rs("Address") = Address
rs("Telephone") = Telephone
rs("qq") = qq
rs("TimePeriod")= TimePeriod
rs("JiaoTong") = JiaoTong
rs("Website") = Website
rs("Recommendation")= Recommendation
rs("Intro") = Intro
rs("pic") =DefaultPicUrl
rs.update
rs.close
call msg("注册成功,进入首页登陆网站!","index.asp")
set rs=nothing
conn.close
set conn=nothing
%>

搜索更多相关主题的帖子: replace fname 帐号 changechr 
2007-11-12 10:57
挥动
Rank: 1
等 级:新手上路
帖 子:45
专家分:0
注 册:2007-11-7
收藏
得分:0 
我看你代码就找 :提示帐号重复
没找到,

别人笑我忒疯癫,我笑别人看不穿!
2007-11-12 11:19
wind2010500
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2007-11-12
收藏
得分:0 
好长啊
2007-11-12 11:40
快速回复:[求助]在做一个asp会员注册系统,可是总是提示帐号重复.
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017875 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved