>>>>> "AB" == Alex Brelsfoard <[EMAIL PROTECTED]> writes:

  >> On Thu, 26 May 2005, Alex Brelsfoard wrote:
  >> 
  >>> Picture a web form that is some sort of a survey.  When that survey is
  >>> submit the perl script writes out the answers onto a file.  That file
  >>> is tab delimited.

  AB> Actually the problem exists BEFORE this part.  You see, the script never
  AB> receives the field name and therefore does NOTHING with.  It only knows to
  AB> do with what it is given.  So my storage format (not decided be me for the
  AB> record) is not the issue.
  AB> Think of it this way:  My perl script reads in all the data sent to it,
  AB> creating a list of fields.  Then I spit out the values associated with
  AB> those fields (who cares how).  But when a checkbox is NOT filled in, that
  AB> field name is NOT sent to my script.  So the list of fields is one field
  AB> shorter than it should be.  And with dynamic or otherwise changing field
  AB> names..... yeah I'm screwed.
  AB> A little clearer?

your code must have direct access to the full list of field names so you
can validate and default them. never trust anything from the
browser. this way missing or bogus fields are handled properly. how you
get this list is another problem than what you are asking and it more
important. most survey type things dynamically generate their forms so
you should have access to that list of fields (not the html page itself
which is a pain to parse).

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to