日期:2014-05-17  浏览次数:20822 次

如何把下拉列表框中的值存进ACCESS数据库?
现在有表users其中有字段hunfou
有下面几项供选择
未婚
已婚
离异
离异有小孩
无恋爱经历

请问这个下拉列表框要怎么做,做完了,怎么存进数据库?

------解决方案--------------------

<%
if request( "action ") <> " " then
---连接数据库
insert into stu_info(name,sex,interest) velue( "&request(txt_name)& ", "&request(sex)& ", "&request(txt_name)& ")
--执行插入
end if
%>
<html>
<head>
<title>
楼主小笨蛋
</title>
</head>
<body>
<form action= " ">
姓名 <input type=text name=txt_name>
性别 <input type=radio name=sex>
爱好 <select name=like>
<option value=sing> 唱歌 </option>
<option value=read> 看书 </option>
<option value=internet> 上网 </option>
</select>
<input type=submit name=action value=提交>
</form>
</body>
</html>