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_V ARS[add]){
...
.....
}
So my questions are:
A. how can I change
if($HTTP_POST_V ARS[add]){
to make it intercept any submit button that starts with add
B. how can I get the corresponding ID number
TIA
- Nicolaas
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_V ARS[add]){
...
.....
}
So my questions are:
A. how can I change
if($HTTP_POST_V ARS[add]){
to make it intercept any submit button that starts with add
B. how can I get the corresponding ID number
TIA
- Nicolaas
Comment