in reply to merging multiple name-value pairs (with precedence)
Addendum: Basically, I know i could split into an array on '&', and then split each element on '=' into hash keys/values, and do cookie, post, get (so newer vals overwrite existing vals), but is there a better way?yep! :) See the "MIXING POST AND URL PARAMETERS" section of the CGI docs .. It says that param() will always return the POST'd data, and that you can simply use url_param() for the GET data .. So you can just do cookie, param, url_param ..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: merging multiple name-value pairs (with precedence)
by EvanK (Chaplain) on Feb 09, 2006 at 15:02 UTC |