怎么样把客户提交的表单数据保存到数据库!!在线等

crc3717 2006-05-24 11:01:22
<form name="form1" method="post" action="">
<input type="hidden" name="company" value="&company">
<input type="hidden" name="address" value="&address">
<input type="hidden" name="cust_id" value="&cust_id">
<input type="hidden" name="contracter1" value="&contracter1">
<p>
<input name="Choice" type="radio" value="1" checked>
Of course
</p>
<p>
<input type="radio" name="Choice" value="2">
Probably </p>
<p>
<input type="radio" name="Choice" value="3">
No </p>
<p>
<input type="radio" name="Choice" value="4">
Undecided </p>

<p><span class="en1">2.Would you like to join us in these activities
during the fair,such as cocktail party seminar? </span></p>

<p>
<input name="Choice_t" type="radio" value="5" checked>
I think I will attend.
</p>
<p>
<input type="radio" name="Choice_t" value="6">
I am not very interested in. </p>

<input type="submit" name="Submit1" value="Submit">
</form>



怎么样才能把表单中提交的数据保存到数据库!
谢谢各位了! 我是新手诶.
...全文
454 10 打赏 收藏 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
crc3717 2006-05-26
  • 打赏
  • 举报
回复
测试可以了!谢谢各位咯
Ischema 2006-05-25
  • 打赏
  • 举报
回复
楼主麻烦了
哈哈
huangqbaby 2006-05-25
  • 打赏
  • 举报
回复
老大,你是做本页提交的话,action=“”,还有你要把数据库的连接路径写出来,还有建议你在新增加数据时用SQL语句,sql="insert into 表名(表里的项) values (更新的值)"
lolo2006 2006-05-25
  • 打赏
  • 举报
回复
晕,重复帖!
zbking 2006-05-25
  • 打赏
  • 举报
回复
ASP的参数传递有post和GET
分别是用request.form 和request.querystring来获取
nmcaha 2006-05-25
  • 打赏
  • 举报
回复
初学应该这样,大家多帮忙。
crc3717 2006-05-24
  • 打赏
  • 举报
回复
怎么这样说呢!我是自己学呀,这些基本的也要学的嘛
谢谢楼上的大哥!有点明白了..
浙外 2006-05-24
  • 打赏
  • 举报
回复
呵呵。楼主真的是个老大啊。想必不是自己学ASP而是帮别人(应该是MM)的忙吧。
senvenliu 2006-05-24
  • 打赏
  • 举报
回复
<form name="form1" method="post" action="?action=save">
<input type="hidden" name="company" value="&company">
<input type="hidden" name="address" value="&address">
<input type="hidden" name="cust_id" value="&cust_id">
<input type="hidden" name="contracter1" value="&contracter1">
<p>
<input name="Choice" type="radio" value="1" checked>
Of course
</p>
<p>
<input type="radio" name="Choice" value="2">
Probably </p>
<p>
<input type="radio" name="Choice" value="3">
No </p>
<p>
<input type="radio" name="Choice" value="4">
Undecided </p>

<p><span class="en1">2.Would you like to join us in these activities
during the fair,such as cocktail party seminar? </span></p>

<p>
<input name="Choice_t" type="radio" value="5" checked>
I think I will attend.
</p>
<p>
<input type="radio" name="Choice_t" value="6">
I am not very interested in. </p>

<input type="submit" name="Submit1" value="Submit">
</form>
<%
if request.QueryString("action")="save" then
'如果没导conn.asp
set conn=server.CreateObject("adodb.connection")
'......
set rs=server.CreateObject("adodb.recordset")
sql="select * from 表名"
rs.open sql,conn,1,3
rs.addnew
rs("记录集")=request.Form("Choice")
rs("记录集")=request.Form("Choice_t")
rs.update
rs.close
end if
%>
gsyst520 2006-05-24
  • 打赏
  • 举报
回复
顶
初学时都一样呀

28,402

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧