洛基浪漫传说:哪位高手帮帮忙啊 这个错在哪里啊

来源:百度文库 编辑:高校问答 时间:2024/05/01 06:14:12
<!--#include file="conn2.asp"-->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>

<form name="form1" method="post" action="?action=search">
<div align="center">
<select name="type">
<option value="1">护肤</option>
<option value="2">彩装</option>
<option value="3">洗涤</option>
<option value="4">其他</option>
</select>
<input type="text" name="name" />
关键字
<input type="submit" name="Submit" value="提交" />
</div>
</form>
<%
if request("action")="search" then
dim ty,na
set rs= Server.CreateObject("ADODB.Recordset")

ty=request.form("type")
na=request.form("name")
sql="select * form goods where gtype like '%"&ty&"%' and gname like '%"&na&"%' "
rs.open sql
if rs.eof or rs.bof then
response.write("alert('没有找到记录')")
response.end
else
do while not rs.eof
%>
<%=rs("gid")%><%=rs("gname")%><%=rs("gtype")%><%=rs("gcontent")%>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
conn2.close
set conn2=nothing
%>

</body>
</html>