Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Building data structures from CGI params

by Anonymous Monk
on Nov 21, 2010 at 11:02 UTC ( #872777=note: print w/ replies, xml ) Need Help??


in reply to Building data structures from CGI params

I know nobody wants to be seen holding up anything from That Other 'P' Web Language as an exemplar, but... well, there it is.

What do they call this feature?

Surely I'm not actually just the second person in the last 15 years to want this?

To my knowledge, why yes, yes you are :D

It seems to be common symptom among those who view cookies and forms as databases... that is not the way to manage session data :)

I would investigate Data::FormValidator and CGI::FormBuilder as an alternative


Comment on Re: Building data structures from CGI params
Re^2: Building data structures from CGI params
by fullermd (Curate) on Nov 21, 2010 at 11:38 UTC
    that is not the way to manage session data

    Quite. Luckily for me, I'm not trying to manage session data, I'm trying to manage form data :p

    A flat namespace is great when you're dealing with 3 or 4 bits of info conceptually at the same level. When you're dealing with 20 or 50 or 200, that are conceptually at varying levels and associations, not so much.

      But what do those other guys call this feature? Link?

      It vaguely reminds me of JSON::Path

        I don't think they have any particular name for it. Just referred to as 'arrays from forms' or the like.

        PHP also understands arrays in the context of form variables (see the related faq). You may, for example, group related variables together, or use this feature to retrieve values from a multiple select input. For example, let's post a form to itself and upon submission display the data:

        (and following "Example #3" on http://us2.php.net/manual/en/language.variables.external.php)

        Related FAQ is How do I create arrays in a HTML <form>?

        The AnotherArray array will now contain the keys 0, 1, email and phone.

        (for those lucky enough not to have PHP on the brain, PHP's "array" serves as both a perl 'array' and 'hash')

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://872777]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-07-11 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (220 votes), past polls