碰上一个乱码的问题,请高人帮忙
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%>