PHP将html表单元素添加到订单页面 [英] PHP with html form elements to an order page

查看:74
本文介绍了PHP将html表单元素添加到订单页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,谢谢。有一个带有1210个复选框的html表单,用于定义项目描述,数量和价格。想要找到一个PHP脚本,在选中复选框时读取这些值,然后创建并显示带有项目编号,描述,单价的预填充订单表格,并添加一个文本框,用户可以在其中选择数量。


每个项目复选框数据看起来像这样......

Hello and thanks. have a html form with 1210 checkboxes that define item description, number and price. would like to find a PHP script that reads these values when the checkbox is checked and then creates and displays a pre-filled order form with Item number, description, unit price and adds a text box where the user can select quantity.

each item checkbox data looks like this ...

展开 | 选择 | Wrap | 行号

推荐答案

Heya,txguy。


当提交带有表单数据的复选框时,如果未选中该复选框,它将不会显示,并且它将包含在的价值 ''ON''如果被选中。


可能你最好的选择是创建一个子数组然后循环它:
Heya, txguy.

When a checkbox is submitted with form data, it will not show up at all if it is unchecked, and it will be included with a value of ''ON'' if it is checked.

Probably your best bet would be to create a sub-array and then loop through it:
展开 | 选择 | Wrap | 行号


将元素名称更改添加到htm页面一个正常,我用以下php创建了一个html页面两个...

adding the element name change to htm page one works ok, and I have created a html page two with the following php ...

展开 | 选择 | Wrap | 行号


Heya ,TX。


您需要确保每个复选框都正确命名:
Heya, TX.

You''ll need to make sure that each checkbox is named properly:
展开 | 选择 | 换行 | 行号


这篇关于PHP将html表单元素添加到订单页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆