Hallo, I have the following perl script which through cgi prints a text box, among other things, and lets me do a keyword search in a mysql database. I was wondering if there is a way to add a button that will replicate the code for again so I can search for two,three, and so on parameters. The code is as follows :
my $i = 0; while (@col = $sth->fetchrow()) { $i++; print "<INPUT TYPE=\"checkbox\" NAME=\"tissues\" VALUE=\"$col[ +0]\">$col[0];\n"; } $sth->finish; print "<br>"; print "The mirna expression level should be: <br>\n"; print "Greater than :<INPUT TYPE=\"TEXT\" NAME=\"greater\"<br>\n"; print "Lower than :<INPUT TYPE=\"TEXT\" NAME=\"lower\"<br>\n"; print "<INPUT TYPE=\"checkbox\" NAME=\"hsa_mirna\" VALUE=\"hsa-mir +-\">hsa-mir-\n"; print "OR\n"; print "<INPUT TYPE=\"checkbox\" NAME=\"block\" VALUE=\"block\">blo +ck\n"; print "<INPUT TYPE =\"textbox\" NAME=\"number\"\n"; print '<INPUT TYPE = SUBMIT VALUE="Click To Submit">'; print '<INPUT TYPE=RESET></FORM>'; print '</body></html>';
the part that I really want to replicate is the textbox element. Is there any way to do that in perl, or should I try to find something in javascript? thank you in advance for any help

In reply to replicating blocks of code in perl and cgi by gogoglou

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.