Monk2b,

The following snippet may not produce what you expect. Although it's no a perl issue, but an HTML form issue.

print "<OPTION VALUE=\"people\">Dennis </OPTION>"; print "<OPTION SELECTED VALUE=\"people\">alex</OPTION>"; print "<OPTION VALUE=\"people\">andrew </OPTION>"; print "<OPTION VALUE=\"people\">Irving</OPTION>"; print "<OPTION VALUE=\"people\">Freddy</OPTION>"; print "<OPTION VALUE=\"people\">Ken</OPTION>"; print "<OPTION VALUE=\"people\">Mike</OPTION>"; print "<OPTION VALUE=\"people\">Tim</OPTION>"; print "<OPTION VALUE=\"people\">Bob</OPTION>"; print "<OPTION VALUE=\"people\">Ashley</OPTION>"; print "<OPTION VALUE=\"people\">Richard</OPTION>"; print "<OPTION VALUE=\"people\">Terrance</OPTION>"; print "<OPTION VALUE=\"people\">Ronald</OPTION>"; print "<OPTION VALUE=\"people\">Phil</OPTION>";

I think that you are most likely desiring that the value from the popup return a value equal to the name of the string in the popup.

Something more like this:

print "<OPTION SELECTED VALUE=\"alex\">alex</OPTION>"; print "<OPTION VALUE=\"andrew\">andrew </OPTION>";

Or in keeping with the above advise about escaping...

print q!<OPTION SELECTED VALUE="alex">alex</OPTION>!;

Otherwise all you'd ever get sent to the target (action=) CGI was "people", not the actual name.

Good luck!


In reply to Re: Something is wrong and I don'tkow what by wardk
in thread Something is wrong and I don'tkow what by monk2b

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.