单选按钮 写入数据库 那里错了?
那个高手帮看看,代码那里有问题,单选框提交表单后写入不了数据库! <%
set conn=server.createobject("adodb.connection")
connstr="Provider=Microsoft.jet.oledb.4.0;data source="&server.mappath("data/votdata.mdb")
conn.open connstr
%>
<%
if request.form("voting")="vottj" then
r=request.Form("vot")
set rs=server.CreateObject("adodb.Recordset")
sql="SELECT * FROM diaocha"
rs.open sql,conn,1,3
rs.addnew
rs("vot")=r
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
<form action="browser.asp" method="POST" name="form1" target="_blank" id="form1" onsubmit="YY_checkform('form1','vot[0]','#q','2','您没有选择!');return document.MM_returnValue">
<table width="200" border="0" cellpadding="0" cellspacing="1" bgcolor="#6BA6E7">
<tr>
<td height="30" bgcolor="#6BA6E7"><div align="center"><span class="STYLE3"></span></div></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><input name="vot" type="radio" value="1" /></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><input type="radio" name="vot" value="2"/></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><input type="radio" name="vot" value="3"/></td>
</tr>
<tr>
<td height="20" bgcolor="#FFFFFF"><input type="radio" name="vot" value="4" /></td>
</tr>
<tr>
<td height="30" bgcolor="#E2EDFA"><div align="center"><input name="voting" type="image" id="voting" src="images/vot.gif" value="vottj"/>
<A HREF="javascript:win_notice('browser.asp')"><img src="images/View.gif" width="52" height="18" border="0" /></a></div></td>
</tr>
</table>
</form>