Hi,

I am sorry to bother everyone but im in a bit of a muddle. I have looked everywhere (including perl monks) for the answer (and found one that i thought might work on perl monks but i couldn't make it work).

My problem is that i am making a small web library (books, Dvd's) with a flat file database for a project and i have come to a problem that has stumped me.

I need to have my script generate a dynamic form with option buttons for however many records were added (this i have done by just looping a table with sequential record Id no.s for the option button values). I then need to set these option buttons and recieve them in another form.

My question is (sorry it took so long) how do i recieve the inputs in the next script if i dont know how many different fields im going to have?

I understand (read it in perl monks and tried it) that i can read teh inputs to an array and but i could not make it work.

These inputs are all for the same field by the way. id much appreciate some help.

here is what i have so far

#!/usr/local/bin/perl -w # loanType.pl # library script to set the loan types of the records require "cgi-lib.pl"; print &PrintHeader; print "<HTML><HEAD><TITLE>Library Admin Screen</TITLE> <LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"library.css\"></ +HEAD> <BODY BGCOLOR=\"#336699\">"; #parse form &ReadParse(*input); #from form $action = $input{'action'}; $itemId = $input{'itemId'}; $firstId = $input{'first'}; $lastId = $input{'last'}; $tempIdStorer = $firstId; for ($firstId..$lastId) { @loanType = $input{'$firstId'}; $i++; } #####rest of my code to alter the records etc.

id really, really appreciate any help anyone can give me


In reply to dynamic form inputs by welshy

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.