急需asp站内搜索代码 谢了!数据库名为chenwen 表名为table_dayi

来源:百度知道 编辑:UC知道 时间:2024/07/08 19:12:47
我 是菜鸟 简单的就行了。我要做的是答疑网站,只要能搜索已经提出的问题即可

index.html:
<form name="form1" method="post" action="answer.asp">
<P align="center"><LABEL for=email><strong><br>
问题:</strong></LABEL>
<INPUT class=inputtext id=name name="question" style="width:220px;height:20px">
</P>
<P align="center" class=formbuttons>
<input name="Submit" type="submit" class="inputbutton" value="登录">
<input name="Submit2" type="reset" class="inputbutton" value="重新填写">
answer.asp
<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("chenwen.mdb")
dim question
question=trim(request.form("question"))
exec="select * from table_dayi where question=&