--- "Bradshaw, Brian" <[EMAIL PROTECTED]> wrote:
> Hi Folks. I have run into a wall and would appreciate any assistance.

Brian,

With all due respect, the code you have below is a broken attempt to handle CGI form 
parsing. 
Rather than retype the concerns that I've typed many times before, I'll just point you 
to a few
posts I've made covering code just like this:

http://www.perlmonks.org/index.pl?node_id=77694
http://www.perlmonks.org/index.pl?node_id=76315
http://www.perlmonks.org/index.pl?node_id=51012
http://www.easystreet.com/~ovid/cgi_course/lesson_two/lesson_two.html

> REQUEST_METHOD: POST

> Now, I am passing in the variables via a form with hidden fields but they
> are not showing up in the QUERY_STRING.

They shouldn't show up in QUERY_STRING.  This is because you use the POST method.  In 
this case,
the data is sent in the body of the request issued by the user agent (browser).

> STDIN reads the CONTENT_LENGTH, i can't figure out where it actually gets
> data to perform the split on.

STDIN doesn't read the content length.  STDIN contains the data and CONTENT_LENGTH is 
the length
of said data.  They should match.

As a side note, I noticed that you were populating some script-specific variables in 
your
form-parsing code.  That's not a good idea.  Each section of code should do one thing 
and do it
well.  It should have *no* side effects, if possible.  This is called 'orthogonal'.  
If code is
orthogonal, it winds up being much easier to maintain.  If a section of code is 
changing things
all over the place and you need to patch up that section, you may need to find all of 
the other
places where that code affects things.  This quickly gets to be a pain.  Having 
functions that
don't access any globals, but instead rely on well-defined arguments that they receive 
and return
is much, much easier to maintain.

Cheers,
Curtis Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to