碰上一个乱码的问题,请高人帮忙

qq163 2003-11-12 06:59:35
<%
function checkPwd(id,psd)
dim conn,param,rs
set conn=server.createobject("adodb.connection")
param="driver={microsoft access driver (*.mdb)}"
conn.open param & ";dbq=" & server.mappath("psd.mdb")
sql="select*from psd where id='" & id & "' and psd='" & psd & "'"
set rs=conn.execute(sql)
if rs.eof then
checkpwd=false
else
checkpwd=true
end if
end function
%>
<%
if isEmpty(session("passed")) then session("passed")=false
id=request("id")
psd=request("psd")
if id="" or psd="" then
response.write"<p align=""center"">输入密码!</p>"
elseif not checkpwd(id,psd) then
response.write"<p align=""center"">输入的密码或用户名有误!</p>"
else session("passed")=true
end if
if not session("passed") then%>
凳入以后
代码则变为
<%
function checkPwd(id,psd)
dim conn,param,rs
set conn=server.createobject("adodb.connection")
param="driver={microsoft access driver (*.mdb)}"
conn.open param & ";dbq=" & server.mappath("psd.mdb")
sql="select*from psd where id='" & id & "' and psd='" & psd & "'"
set rs=conn.execute(sql)
if rs.eof then
checkpwd=false
else
checkpwd=true
end if
end function
%>
<%
if isEmpty(session("passed")) then session("passed")=false
id=request("id")
psd=request("psd")
if id="" or psd="" then
response.write"<p align=""center"">ê?è??ü??!</p>" /乱码
elseif not checkpwd(id,psd) then
response.write"<p align=""center"">ê?è?μ??ü???òó??§??óD?ó!</p>"/乱码
else session("passed")=true
end if
if not session("passed") then%>
...全文
24 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,408

社区成员

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

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