具有动态输入的表格 [英] forms with dynamic inputs

查看:78
本文介绍了具有动态输入的表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨大师


我有一个带有表单的php页面,它的行如下:


< form ...>

项目ID为234

< input type = submit ... NAME = add234 ID = add234>

< ;输入类型=隐藏NAME = add234 ID = 234>

项目ID为235

< input type = submit ... NAME = add235 ID = add235>

< input type = hidden NAME = add235 ID = 235>

[.... etc ....]

< / form> ;


在文档顶部的PHP代码中,我想:


a。截取表格中的任何提交

b。得到相关的身份证号码


目前,我只有一个添加按钮,所以我使用这样的代码:


if($ HTTP_POST_VARS [添加]){

...

.....

}


所以我的问题是:


A.我怎样才能更改


if($ HTTP_POST_VARS [add]){


使它拦截任何以添加开头的提交按钮


B.如何获得相应的身份证号码

TIA


- Nicolaas

Hi Gurus

I have a php page with a form in it, that is along the lines of:

<form...>
item with id 234
<input type=submit ... NAME=add234 ID=add234>
<input type=hidden NAME=add234 ID=234>
item with id 235
<input type=submit ... NAME=add235 ID=add235>
<input type=hidden NAME=add235 ID=235>
[....etc....]
</form>

In the PHP code at the top of the document, I want to:

a. intercept any submit from the form
b. get the related ID number

At the moment, I have only one add button, so I use code like this:

if($HTTP_POST_VARS[add]){
...
.....
}

So my questions are:

A. how can I change

if($HTTP_POST_VARS[add]){

to make it intercept any submit button that starts with add

B. how can I get the corresponding ID number
TIA

- Nicolaas

推荐答案

HTTP_POST_VARS [add]){

.. 。

.....

}


所以我的问题是:


A.如何更改


if(
HTTP_POST_VARS[add]){
...
.....
}

So my questions are:

A. how can I change

if(


HTTP_POST_VARS [add]){


拦截任何以添加开头的提交按钮


B.如何获得相应的身份证号码

TIA

- Nicolaas
HTTP_POST_VARS[add]){

to make it intercept any submit button that starts with add

B. how can I get the corresponding ID number
TIA

- Nicolaas


WindAndWaves写道:
WindAndWaves wrote:
嗨大师

我有一个带有表格的php页面,这就是:

<表格...>
ID为234的项目
<输入类型=提交... NAME = add234 ID = add234>
< input type = hidden NAME = add234 ID = 234> ;
项目ID为235
<输入类型=提交... NAME = add235 ID = add235>
< input type = hidden NAME = add235 ID = 235>
[....等....]
< / form>

在文档顶部的PHP代码中,我想:
a。截取表格中的任何提交
b。得到相关的身份证号码

目前,我只有一个添加按钮,所以我使用这样的代码:

if(
Hi Gurus

I have a php page with a form in it, that is along the lines of:

<form...>
item with id 234
<input type=submit ... NAME=add234 ID=add234>
<input type=hidden NAME=add234 ID=234>
item with id 235
<input type=submit ... NAME=add235 ID=add235>
<input type=hidden NAME=add235 ID=235>
[....etc....]
</form>

In the PHP code at the top of the document, I want to:

a. intercept any submit from the form
b. get the related ID number

At the moment, I have only one add button, so I use code like this:

if(


这篇关于具有动态输入的表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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