It would be helpful to see a couple of rows as rendered into HTML. However, just looking at what I see here, it looks like you're creating a form with a large number of text inputs named "Detail" and a large number of submit buttons. Only one "Detail" will make it to the form processor; you can't overload text inputs with multiple options like you can with, say, checkboxes.
You can, however, differentiate between "Submit" buttons using their name attribute. Another way to do what you're trying to do would be something like this:
That way, whichever "Update" button gets clicked, you'll end up with a variable named "Whatever" set to "Update" (where "Whatever" was the Detail variable). So you can, for example,<td> <!-- TMPL_VAR NAME=Detail --> </td> <td> <input type="submit" name=<!-- TMPL_VAR NAME=Detail --> value="Update" +> </td>
HTHforeach ($query->param) { if ($query->param($_) eq "Update") { # If $Detail was "red", we'll change to red &change_Color($_); last; } }
In reply to Re: Logical question-to upate DB records
by gowen
in thread Logical question-to upate DB records
by thisisperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |