It's not really a Perl question, it's more of an organizational one. Bottomline, if you can be sick with all three, then use checkboxes. If only one, then use radio.

In your database you would have a table for all the kinds of sickness, a table for the patient id, and a table with a column for the patient id and one for the type of sickness id. You would join the patient and tables to do a query on any one patient.

HTML: <input type="checkbox" name="stomach" value="1" /> <input type="checkbox" name="head" value="2" /> <input type="checkbox" name="feet" value="3" /> SICKNESS TABLE: +----+---------+ | id | name | +----+---------+ | 1 | stomach | +----+---------+ | 2 | head | +----+---------+ | 3 | feet | +----+---------+ PATIENT TABLE: +----+---------+ | id | name | +----+---------+ | 1 | Bill | +----+---------+ | 2 | Susan | +----+---------+ | 3 | Mary | +----+---------+ STATUS TABLE: +------------+----------+ | patient id | sickness | +------------+----------+ | 1 | 2 | +------------+----------+ | 1 | 3 | +------------+----------+ | 2 | 1 | +------------+----------+

Insert a row into the "patient-sickness" table for each type of sickness the patient has checked.


—Brad
"The important work of moving the world forward does not wait to be done by perfect men." George Eliot

In reply to Re^3: mysql, checkbox, set, processing by bradcathey
in thread mysql, checkbox, set, processing by Anonymous Monk

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.