Oh Venerable Brothers of the #!
I need help! I would like to create a Dynamic form which will change with the output from a database query
Using input from a Database Table

The number of fields in the form will vary depending on the output of the Database Query

Users need to be able to provide input for each field

The resultant out put needs to be then uploaded into another database

Help!!!

How dow I create such a dynamic form and convert all the parameters into variables when the number of variable will change depending on the input from the user - I am using a multipart form and using CGI and DBI
Examples would be greatly appreciated

SQL Query:
select month_year, study_stage from study_stage_bymonth where studyid = 'abc'

Output example:
01-JAN-11 Start Up
01-FEB-11 Registering
01-MAR-11 Maintenance
01-APR-11 Maintenance
01-MAY-11 Maintenance
01-JUN-11 Maintenance
01-JUL-11 Maintenance
01-AUG-11 Maintenance
01-SEP-11 Maintenance
01-OCT-11 Maintenance
01-NOV-11 Maintenance
01-DEC-11 Close Out
01-JAN-12 Study Finished

output for study efg will be different

Help!!
Examples appreciated

In reply to How to I build a Dynamic Form from a Database output by Patrick Devitt

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.