Loading ...
Sorry, an error occurred while loading the content.
 

How to process a

Expand Messages
  • ghawk@eskimo.com
    Howdy, Problems. For the last couple of days I ve been covering a lot of ground on a DSL connection in multiple search engines trying to find out how to
    Message 1 of 1 , Mar 3, 2000
      Howdy,

      Problems. For the last couple of days I've been covering a lot of
      ground on a DSL connection in multiple search engines trying to find
      out how to process a <select multiple... style form element, and I'm
      at the end of my rope. If anyone has a URL that shows how to do
      this, please post it, or *make one* for the world. It should be as
      simple as possible, nothing fancy. I should be able to adapt it then
      for a search engine I wrote, which right now is just using a
      non-elegant approach using checkboxes to select which years out of a
      collection of archive files to search.

      By far the best route would be a working form that also shows the
      cgi/perl script, and will return on submit some simple response like:

      Selected: 2000
      Selected: 1999
      Not selected: 1998

      So the form is something like this:

      <FORM action="http://somesite.com/cgi-bin/prog.cgi" method="post">
      <SELECT multiple name="multiselect">
      <OPTION selected value="2000">2000</OPTION>
      <OPTION selected value="1999">1999</OPTION>
      <OPTION value="1998">1998</OPTION>
      </SELECT>
      <INPUT type="submit" value="Submit"><INPUT type="reset"
      value="Reset">
      </FORM>

      ...and the script would contain a 'foreach' loop I suppose, checking
      for the existence of each array item? Optionally you could leave out
      the 'Not selected' part, and only print 'Selected' for those that
      are, ignoring those that are not selected.

      I would *greatly* appreciate seeing this at its simplest!

      Gary
    Your message has been successfully submitted and would be delivered to recipients shortly.