帮忙查错,谢谢。

hengshanyang 2006-11-13 04:40:54
下面的代码为什么不能正确执行?
<!--#include file ="../inc/conn.asp"-->
<%

Dim username
Dim password

username=trim(request.form("username"))
password=trim(request.form("password"))
On Error Resume Next

ssql="select * from user where username='"& username &"' and password='"&password&"'"
oRs.open ssql,oconn,0,1

if not ors.eof then
Response.Redirect "edit/add.asp"
else
Response.Redirect "admin.asp"
response.end
end if

%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>用户验证</title>
</head>

<body>
</body>

</html>
...全文
70 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
北京不不 2006-11-14
  • 打赏
  • 举报
回复
有什么错误提示吗?
hengshanyang 2006-11-14
  • 打赏
  • 举报
回复
晕。oconn和oRs都在包含文件里定义了。
hengshanyang 2006-11-14
  • 打赏
  • 举报
回复
无法显示网页
您要访问的网页有问题,无法显示。

--------------------------------------------------------------------------------

请尝试以下操作:

打开 jbxt:81 主页,然后查找指向您感兴趣信息的链接。
单击刷新按钮,或以后再试。

单击搜索,寻找 Internet 上的信息。
也可查看相关站点列表。




HTTP 500 - 内部服务器错误
Internet Explorer
stou 2006-11-13
  • 打赏
  • 举报
回复
set oRs=server.createobject("adodb.recordset")
hengshanyang 2006-11-13
  • 打赏
  • 举报
回复
oconn定义在包含文件里呀。
北京不不 2006-11-13
  • 打赏
  • 举报
回复
oconn数据库联接....你没定义赋值..看书吧.

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧