以下代码,我在提交时,没有提示出错,但是插入的select中的“resenduser”到表里,后发现是空值,大家帮帮忙!
<% if request("editsignfile")="转发" then
userid=request.form("userid")
resenduser=request.form("resenduser")
set conn=opendb("oabusy","conn","accessdsn")
set rs1=server.createobject("adodb.recordset")
sql = "update signfile set "
sql = sql & "resenduser=" & SqlStr(resenduser) & "where userid='"&userid&"'"
conn.Execute sql
response.write("转发成功!")
end if
%>
<form action="sendfile.asp" method="post">
<table align="center">
<tr>
<td>
<select name="resenduser">
<option selected>请选择转发人</option>
<% set conn=opendb("oabusy","conn","accessdsn")
set rsname=server.createobject("adodb.recordset")
sql="select distinct name from userinf"
rsname.open sql,conn,1,1
do while not rsname.eof and not rsname.bof %>
<option value="<%=rsname("name")%>" ><%=rsname("name")%></option>
<% rsname.movenext
loop %>
</select>
</td>
</tr>
</table>
</form>