The Code is as follows: & amp; lt ;? Phpforeach ($ userinfoas $ key & amp; gt; $ value) {code...} & amp; lt ;? & Amp; gt; & amp; lt; inputtype & quot; text & quot; value & quot; & amp; lt ;? Phpecho $ merch-& amp; gt; merch_id ;? & Amp; gt; & quot; & amp; gt; & amp; lt; formid & quot; modity & quot; method & quot; the Code is as follows:
Foreach ($ userinfo as $ key => $ value ){
$user=(object)$value;
}
?>
Why is the input value $ _ POST ['device _ id'] submitted to another page always the value in the first row of the table? The onclick event using tag a cannot pass the value of this row? However, it is normal to remove the value printed by the hidden attribute. I don't understand the reason. Please explain it...
Reply content:
The Code is as follows:
Foreach ($ userinfo as $ key => $ value ){
$user=(object)$value;
}
?>
Why is the input value $ _ POST ['device _ id'] submitted to another page always the value in the first row of the table? The onclick event using tag a cannot pass the value of this row? However, it is normal to remove the value printed by the hidden attribute. I don't understand the reason. Please explain it...
Input is not specified name
? How do you obtain data? Different forms depend on different name
Attribute.
Same name?
If the name of an http request is the same, the other one is removed .. At the same time, this question looks messy.
You have n forms. If you want to submit the form in the same form, first take the form out of the loop, and then the name can be obtained using aaaa []. The post is an array.
Supplement: the question is a bit messy, but the main reason is that the name is either set to different, or set to name [] to get the result as an array ..........