主题:这个表单要怎么修改?????
<form method="POST" name="myform" onSubmit="return CheckForm();" action="ArticleSave.asp?action=add" target="_self">
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr>
<td height="20" align="center" class="title"> </td>
</tr>
<tr align="center">
<td class="tdbg">
<table width="550" border="1" cellpadding="0" cellspacing="2">
<tr>
<td width="150" height="22" align="right" bgcolor="#E3E3E3">所属类别:</td>
<td bgcolor="#E3E3E3">
<%
sql = "select * from BigClass"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
else
%>
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
<option selected value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
dim selclass
selclass=rs("BigClassName")
rs.movenext
do while not rs.eof
%>
<option value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
<select name="SmallClassName">
<option value="" selected>不指定小类</option>
<%
sql="select * from SmallClass where BigClassName='" &amp;amp; selclass &amp;amp; "'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
%>
<option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<% rs.movenext
do while not rs.eof%>
<option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<%
rs.movenext
loop
end if
rs.close
%>
<%
ranNum=int(9*rnd)+10
iddata=month(now)&amp;amp;day(now)&amp;amp;hour(now)&amp;amp;minute(now)&amp;amp;second(now)&amp;amp;ranNum
%>
</select> </td>
。。。。。。。。。。。。
以上为一向数据库添加产品的表单(部分),原先的表单只能向数据库里写入产品的大类和小类名称,现在我希望在写入产品的大类和小类名称的同时,自动向数据库里写入相应的大类和小类ID,数据库没有问题。数据库的大类表里有大类名称和大类ID,小类表里有小类名称,小类ID,大类名称,大类ID。该怎么修改代码??请各位师哥,师姐指导!!!!!
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr>
<td height="20" align="center" class="title"> </td>
</tr>
<tr align="center">
<td class="tdbg">
<table width="550" border="1" cellpadding="0" cellspacing="2">
<tr>
<td width="150" height="22" align="right" bgcolor="#E3E3E3">所属类别:</td>
<td bgcolor="#E3E3E3">
<%
sql = "select * from BigClass"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
else
%>
<select name="BigClassName" onChange="changelocation(document.myform.BigClassName.options[document.myform.BigClassName.selectedIndex].value)" size="1">
<option selected value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
dim selclass
selclass=rs("BigClassName")
rs.movenext
do while not rs.eof
%>
<option value="<%=trim(rs("BigClassName"))%>"><%=trim(rs("BigClassName"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
<select name="SmallClassName">
<option value="" selected>不指定小类</option>
<%
sql="select * from SmallClass where BigClassName='" &amp;amp; selclass &amp;amp; "'"
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
%>
<option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<% rs.movenext
do while not rs.eof%>
<option value="<%=rs("SmallClassName")%>"><%=rs("SmallClassName")%></option>
<%
rs.movenext
loop
end if
rs.close
%>
<%
ranNum=int(9*rnd)+10
iddata=month(now)&amp;amp;day(now)&amp;amp;hour(now)&amp;amp;minute(now)&amp;amp;second(now)&amp;amp;ranNum
%>
</select> </td>
。。。。。。。。。。。。
以上为一向数据库添加产品的表单(部分),原先的表单只能向数据库里写入产品的大类和小类名称,现在我希望在写入产品的大类和小类名称的同时,自动向数据库里写入相应的大类和小类ID,数据库没有问题。数据库的大类表里有大类名称和大类ID,小类表里有小类名称,小类ID,大类名称,大类ID。该怎么修改代码??请各位师哥,师姐指导!!!!!