Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
try this for fun - it accepts the text box values as anrray #!/usr/bin/perl ## relatively painless iteration over multiple selection boxes use CGI qw(:standard); @sel = param('sel'); @entry = ("first", "second", "third", "fourth", "fifth", "sixth", "sev +enth", "eighth", "ninth", "tenth"); print "Content-Type: text/html\n\n"; if ($sel[0] ne '') { # do database stuff here (each entry in the sel array is the index to + your array of data for the database) ## just for fun show boxes checked foreach $ent (@sel) { print "you checked the $entry[$ent] box<br>\n"; } } print <<EOF <form name=fred action=jd.cgi> <table> <tr> <td> one <input type=checkbox name=sel value=0> </td> <td> two <input type=checkbox name=sel value=1> </td> <td> three <input type=checkbox name=sel value=2> </td> <td> four <input type=checkbox name=sel value=3> </td> <td> five <input type=checkbox name=sel value=4> </td> </tr> <tr> <td> six <input type=checkbox name=sel value=5> </td> <td> seven <input type=checkbox name=sel value=6> </td> <td> eight <input type=checkbox name=sel value=7> </td> <td> nine <input type=checkbox name=sel value=8> </td> <td> ten <input type=checkbox name=sel value=9> </td> </tr> </table> <input type=submit value=showme> </form> EOF Hope this helps John

In reply to Re: Re: Converting large numbers of checkboxes to small number of params by johndageek
in thread Converting large numbers of checkboxes to small number of params by MrCromeDome

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2022-12-08 05:32 GMT
Find Nodes?
    Voting Booth?

    No recent polls found