As a new initiate into the monestary, I feel somewhat timid in posting so soon, expecting knowledge so rapidly after giving little in return yet.. I hope that I may be favored with a reply...
I am writing a CGI mileage calculator for my employer between several fixed locations. Each time thru, the trip is given four variables to remember ($date, $source, $destination, $miles). These are stored in an array (@table), and output in an html table for the user to see. @table is stored in a cookie (trip_history), then recalled when the script is called again as the user re-submits and adds four new $date, $source, $destination, $miles. These four values are placed at the beginning of @table with unshift(). When the html table is regenerated again, the first value in the array $table(0) is the list stored in the cookie! I have the cookie formatted as a comma-delimited list, but the first value reads like "1, HHS, GHS, 6.7, 2, GHS, MHS, 4.2" instead of $table(0) being 1, $table(1)=HHS, $table(2)=GHS, and so on.
How do I put an array into a cookie, then retrieve it still as an array and modify it yet again and store it as a cookie and retrieve it again...?
In reply to Storing an array in a cookie... by Nacho37
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |