急,简单的asp代码出错,帮帮忙

来源:百度知道 编辑:UC知道 时间:2024/09/23 20:20:18
<!--#include file="connections/conn.asp" -->
<%Set rsObj = Server.CreateObject("ADODB.RecordSet")%>
<%

username=session("username")
sql="select * from yonghu WHERE name = '"&username&"'"
rsObj.open sql,conn,2,3
rsObj("name") = Request.Form("name")
rsObj("password") = Request.Form("password")
rsObj("sex") = Request.Form("sex")
rsObj("email") = Request.Form("email")
rsObj("aihao") = Request.Form("aihao")
rsObj("qq") = Request.Form("qq")
rsObj("tel") = Request.Form("tel")
rsObj("dizhi") = Request.Form("dizhi")
rsObj("birthday") = Request.Form("birthday")
rsObj("jianjie") = Request.Form("jianjie"

我喜欢用这个
response.write "<script>alert('恭喜,修改成功!');</script>"
Response.Write "<script type=""text/javascript"">top.location.href=""xgzl.asp"";</script>"

-->
改成:
//-->

另外,一旦你向客户端浏览器输出内容,比如上边的ALERT,那么下边的页面重定向会导致服务器脚本错误:
<%response.redirect("xgzl.asp")%>