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:

<td> <!-- TMPL_VAR NAME=Detail --> </td> <td> <input type="submit" name=<!-- TMPL_VAR NAME=Detail --> value="Update" +> </td>
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,
foreach ($query->param) { if ($query->param($_) eq "Update") { # If $Detail was "red", we'll change to red &change_Color($_); last; } }
HTH

In reply to Re: Logical question-to upate DB records by gowen
in thread Logical question-to upate DB records by thisisperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.