我想做一个页面:
分别输入name,cards,model,sn
然后在同一页面上显示state
他们是在同一个表中
<!-- #include file="conn.asp" -->
<title>硬件更改</title>
<style type="text/css">
<!--
.l1 { font-size: 14px;
width: 150px;
}
-->
</style>
<form name="form1" method="post" action="" onSubmit="return submitcheck()">
<table width="344" border="0" align="center">
<tr>
<td width="69">硬件名:</td>
<td colspan="2"><% set rs1=Con.Execute("select distinct name from part")
%>
<select name="name">
<%
do while not rs1.EOF %>
<option value="<%=rs1("name")%>"><%=rs1("name")%></option>
<% rs1.movenext
Loop
%>
</select>
</td>
</tr>
<tr>
<td>品牌:</td>
<td colspan="2"><label>
<input name="cards" type="text" value="canon" size="20">
</label></td>
</tr>
<tr>
<td>型号:</td>
<td colspan="2"><label>
<input name="moder" type="text" value="99" size="20">
</label></td>
</tr>
<tr>
<td>序列号:</td>
<td colspan="2"><label>
<input name="sn" type="text" value="99" size="20">
</label></td>
</tr>
<tr>
<td>状态:</td>
<td colspan="2"><%
tname=Request.Form("name")
tcards=Request.Form("cards")
tmoder=Request.Form("moder")
tsn=Request.Form("sn")
set rs2=con.Execute("select state from part where [name]='"& tname &"' and cards='"& tcards &"' and moder='"& tmoder &"' and sn='"& tsn &"'")
%><label>
<input type="text" name="state" />
</label></td>
</tr>
<tr>
<td>更改为:</td>
<td width="98"><label>
<select name="select2">
</select>
</label></td>
<td width="163">在
<input name="textfield5" type="text" size="15"></td>
</tr>
</table>
</form>
我想要把数据库中满足条件的state输出给文本框“state”!