我是新手,请大家帮我看看这两段asp代码,第一段肯定是没有问题,第2段代码出错,实在不知道问题出在什么地方,请各位帮我分析一下,谢谢!
第一段代码:文件名为zh.asp
<html>
<head>
<title>zh.asp</title>
</head>
<body>
<%
dim user
dim flag
dim say
response.Buffer=true
response.ContentType="text/html"
response.Charset="gh2312"
user=request.form("username")
pwd=request.Form("password")
say=request.QueryString("say")
%>
<form method="post" action="zh2.asp">
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td>用户名:</td>
<td><input type="text" name="username" size="15"></td>
</tr>
<tr>
<td>密 码:</td>
<td><input type="password" name="password" size="15"></td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="bt1" value="提交"> <input type="reset" name="bt2" value="重置"></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
</table>
<%
if say=1 then
response.write "欢迎光临小站!"
end if
if say>1 then
response.write "欢迎再次光临网站!"
end if
if user="admin" and pwd="shisheng" then
response.expires=1
flag=1
elseif user="guest" and pwd="guest" then
response.Expires=0
response.Clear()
flag=2
elseif user="vip" and pwd="vip" then
response.write"欢迎vip会员光临本站!"
flag=3
else
flag=0
response.End()
end if
response.Write( "<p><a href=\\\'zh2.asp?flag="&flag & "\\\'>动态网站设计实践练习</a></p>")
response.Write("")
%>
<p align="center">动态网站设计ASP 篇 (7) 实践练习 </p>
</body>
</html>
第二段代码:zh2.asp
<html>
<head>
<title>zh2.asp</title>
</head>
<body>
<%
Dim saysay=Request.QueryString("flag")
Select case say
case "1"
Response.Redirect "zh2.asp?say=1"
case "2"
Response.Redirect "zh2.asp?say=2"
case "3"
Response.Redirect "zh2.asp?say=3"
case "0"
Response.Redirect "zh2.asp?say=0"
End Select
%>
</body>
</html>
[此贴子已经被作者于2007-10-12 16:38:34编辑过]