简体   繁体   English

PHP将动态字段保存到MYSQL数据库

[英]PHP save dynamic fields to MYSQL database

I have a form with fixed elements like radio button, text boxes, drop downs, etc. 我有一个带有固定元素的表单,例如单选按钮,文本框,下拉列表等。

There is also an area of dynamically generated dates and text boxes passes to the Post as an array to be saved into a MYSQL database. 还有一个动态生成的日期区域,文本框作为数组传递到Post,以保存到MYSQL数据库中。

The form is quite big and I would like to give the user the possibility to save it avoiding to have to retype data all the time. 表格很大,我想让用户可以保存表格,而不必一直输入数据。

I would also like to give the user the possibility to save their choices by storing a date and a description of their selection. 我还想通过存储日期和对其选择的描述,使用户可以保存他们的选择。

The problem is that I don't know how to tackle this problem as I don't know how to handle the dynamic part of the form. 问题是我不知道如何处理该问题,因为我不知道如何处理表单的动态部分。 i am trying to generate a sort of automatic process but I cannot think of a workable solution. 我正在尝试生成一种自动过程,但我想不出可行的解决方案。

Any idea? 任何想法?

If by dynamic you refer to xml requests ( ajax ) then you can easily save all the data in session cookies, as this very site does when you're asking a question. 如果通过动态方式引用xml请求(ajax),则可以轻松地将所有数据保存在会话cookie中,就像这个网站在询问问题时一样。 :P :P

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM