找错误

wxcyz 2004-12-09 11:44:06
<%
'从提交表单返回值,并查看是否有非法自符
uid=replace(request("uid"),"'","’")
pwd=replace(request("pwd"),"'","’")
email=replace(request("email"),"'","’")
sex=request("sex")
age=replace(request("age"),"'","’")
namez=replace(request("namez"),"'","’")
govz=replace(request("govz"),"'","’")
shengz=replace(request("shengz"),"'","’")
cityz=replace(request("cityz"),"'","’")
dizhiz=replace(request("dizhiz"),"'","’")
tel=replace(request("tel"),"'","’")
postnumber=replace(request("postnumber"),"'","’")
fax=replace(request("fax"),"'","’")

if fax="" then fax="未填写"



'开始向数据库写入数据,并检测是否已有此用户
set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM zuser where uid= '" & uid & "'"
rs.open sql,conn,1,3

if not (rs.Bof or rs.eof) then
rs.Close
set rs=nothing
response.redirect "error.asp?err=004"
response.end
else

sql="insert into zuser(uid,pwd,email,sex,age,namez,govz,shengz,cityz,dizhiz,tel,postnumber,fax) values ('"&uid&"','"&pwd&"','"&email&"','"&sex&"','"&age&"','"&namez&"','"&govz&"','"&shengz&"','"&cityz&"','"&dizhiz&"','"&tel&"','"&postnumber&"''"&fax&"')"
conn.Execute(sql) '这句出错

response.redirect "index.asp"
end if

%>
...全文
22 点赞 收藏 2
写回复
2 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
chenyouzhi123 2005-09-01
回复
wxcyz 2004-12-09
气死我了
怎么弄都出错
以前都用得好好的
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2004-12-09 11:44
社区公告
暂无公告