如何在经典 asp 或 vbscript 中将值从客户端 html 传递到服务器端?
我有一个 html 表单,需要将表单中的值传递到我的后端,即 vbscript/classic asp。因此,我需要做的是将这些值存储在后端的数组中,然后将这些值传递到我的 MS-Access 数据库中,以便进一步处理。我对这一切都很陌生,请尽快回复。
提前致谢。 :)
感谢您的回复。更具体地说:
可以有N(最多10)个商品,每个商品对应固定的8个字段(关于商品的型号,价格,删除日期等) 。所以,我的想法是,为这 8 个字段中的每一个字段创建一个对应的数组(比如一个对应型号,一个对应价格等等)。因此,我将有 8 个数组。现在,收集这些值来完成请求(我的意思是,收集与每个项目对应的型号、日期、价格等)。然后邮寄此请求。我已经得到了邮件的代码,并且知道如何将其存储在数据库中,但有两个问题:
1)不知道如何收集数组中数据库中的值。(在经典的 asp/vb 中)
2)如何生成用于收集单个数组中每个项目对应的所有信息并存储在 MS-Access 数据库中的唯一键。
希望现在我更清楚了。
预先感谢大家。 :)
I have a form in html and need to pass the values from the form to my backend which is vbscript/classic asp. So, what I need to do is to store these values in an array in my backend and after that pass these values in my MS-Access database, where it can be stored for further processing. I am new to all this, and plzz reply as soon as possible.
Thanks in advance. :)
Thanks for your replies.To be more specific:
There can be N (max 10) number of items, and corresponding to each item there will be fixed 8 number of fields (regarding item's model number, price, date of removal etc). So, what I have thought is, make an array corresponding to each of the 8 fields (like one corresponding to model number, one corresponding to price and so on). Thus, I will have 8 arrays. Now, collect these values to complete a request (I mean, collect model number,date, price etc corresponding to each item). And then mail this request. I have got the code for mailing and know how to store it in the data base but there are 2 problems :
1) Dont know how to collect values in the dataase in the arrays.(in classsic asp/vb)
2) how to generate a unique key to gather all the information corresponding to each item in a single array and store in MS-Access database.
Hope now I am much more clearer.
Thanks all in advance. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您几乎准确地描述了如何做到这一点,因此很难知道该给您什么答案。
是的,您有一个表单,并将其提交到服务器。 ASP 框架将允许您访问表单变量,并将其存储到数据库中。
我 100% 确定它在针对您的平台 vbscript/classic asp 的教程中准确描述了如何执行此操作。我无法给你一个确切的代码示例,因为我现在使用 ASP 已有 10 多年了,我已经忘记了确切的语法,但快速的 google 搜索发现了这个 ASP 数据库表单教程:
http://www.codefixer.com/tutorials/form_to_database.asp
You pretty much described exactly how to do it, so it's hard to know what answer to give you.
Yes, you have a form, and you submit that to the server. The ASP framework will let you access the form variables, and store it to a database.
I'm 100% sure it's described exactly how to do this in the tutorial for your platform, vbscript/classic asp. I can't give you an exact code example as it's over 10 years since I worked with ASP now and I've forgotten the exact syntax, but a quick google search found this form to database tutorial for asp:
http://www.codefixer.com/tutorials/form_to_database.asp