In addition to what others have said, you do want to minimize the amount of details that you carry between forms, both from a bandwidth-friendly standpoint, as well as from a security standpoint (since hidden fields are only hidden to those oblivious to the View Source command...)
The best solution is to create a unique session id (based on any number of unique factors including localtime, user's id, random numbers, and so forth), and store the large data into that, and only send the session id in the hidden field. The recieving script can then verify the id and get the info it needs from the file. Now, one problem here is how to store the data; arrays and hashes don't store directly, but if you use either Data::Dumper, or FreezeThaw (as examples), which can convert a complex data structure to something that can be recovered, you can write the data out to file and read it in at the next step.
If you are absolutely keen on using everything as hidden fields, you can also probably apply these same modules to convert the array or hash to a printable string, which you can use as the value field for the hidden array. But again, this is a potental security problem as you open your CGI inner workings to the user.
Dr. Michael K. Neylon - mneylon-pm@masemware.com
||
"You've left the lens cap of your mind on again, Pinky" - The Brain
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.