in reply to Logical question-to upate DB records
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; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Logical question-to upate DB records
by BUU (Prior) on Jun 01, 2004 at 21:14 UTC | |
by gowen (Initiate) on Jun 17, 2004 at 20:05 UTC | |
|
Re: Re: Logical question-to upate DB records
by thisisperl (Novice) on Jun 01, 2004 at 21:20 UTC | |
by IOrdy (Friar) on Jun 02, 2004 at 00:32 UTC | |
by thisisperl (Novice) on Jun 02, 2004 at 17:14 UTC |