×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

I made a sample for you, good luck.

<% @LANGUAGE = VBScript %>
<%Option Explicit%>
dim objConn, strSQL, value1, value2, value3, totalvalue
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Provider = "Microsoft.Jet.OLEDB.4.0"
objConn.Open "yourpath\yourdatabase.mdb"

value1 = trim(Request.Form("data1"))
value2 = trim(Request.Form("data2"))
value3 = trim(Request.Form("data3"))
totalvalue = value1 + value2 + value3

strSQL = "Insert into yourtable (value1, value2, value3, totalvalue) values (" & value1 & "," & value2 & "," & value3 & "," & totalvalue & ")"
objConn.Execute strSQL

<html>
<head>
<title>collect form data</title>
</head>
<body>
<form name="form1" action="<%=Request.ServerVariables("SCRIPT_NAME")%>" method="post">
<input type="text" name="data1">
<input type="text" name="data2">
<input type="text" name="data3">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / Web page 高手give me a hand please.
    我正在用frontpage 2000 做网页。原来有个send to databse option 可以用,但不知何故,今天死活不能用了。send to database在insert得下拉菜单里,现在一直是灰的,急死我了,请帮帮我,多谢了。
    • Web page 高手用frontpage 2000 地估计不多。你还不如说你想干什么,说不准一堆code就给你了。
      • 我想把form 里的输入值自动送到Access database.give me a hand, Thanks a lot alot alot.
      • 我还想把form 的值(很多)加起来,却不知如何做,帮帮忙。我是菜菜鸟,不好意思。
    • 装了ODBC了吗?
      其实我也不懂。
    • I made a sample for you, good luck.
      <% @LANGUAGE = VBScript %>
      <%Option Explicit%>
      dim objConn, strSQL, value1, value2, value3, totalvalue
      Set objConn = Server.CreateObject("ADODB.Connection")
      objConn.Provider = "Microsoft.Jet.OLEDB.4.0"
      objConn.Open "yourpath\yourdatabase.mdb"

      value1 = trim(Request.Form("data1"))
      value2 = trim(Request.Form("data2"))
      value3 = trim(Request.Form("data3"))
      totalvalue = value1 + value2 + value3

      strSQL = "Insert into yourtable (value1, value2, value3, totalvalue) values (" & value1 & "," & value2 & "," & value3 & "," & totalvalue & ")"
      objConn.Execute strSQL

      <html>
      <head>
      <title>collect form data</title>
      </head>
      <body>
      <form name="form1" action="<%=Request.ServerVariables("SCRIPT_NAME")%>" method="post">
      <input type="text" name="data1">
      <input type="text" name="data2">
      <input type="text" name="data3">
      <input type="submit" name="Submit" value="Submit">
      </form>
      </body>
      </html>
      • Thank you so much, gamma. You are really a GAO Shou.
        • you are welcome :)) Try to give up frontpage if you want to be a good web programmer.
          • I agree with u, but I regard Frontpage as an edit tool, its interface is good to use, I mean it better than text editor. Anyway, I stil hope you can give me some advice in future. Thank you very much.