Phoenix.pm: printindusty.com form problem

Michael Dearman mdearman at inficad.com
Wed Jun 28 16:05:54 CDT 2000


Hey Mark,

Spoke with you earlier this am, and we went over the industry.com site's
problem with the too long of a string as the param 'require'. At least
for the older AOL clients.

I finally got my caffeine level topped off, and went and got a CGI book
to fill a hole in my library. Had always envisioned using something other
that just plan ole CGI. But I guess I forgot the maxim that most work is
maintenace. I'll correct that gap.

Anway. Now that I see that that 'require' param is just a long string and
not a set of key/val pairs (duh), yes I guess one way would be to break
that string up into 2 params (e.g. require1 and require2) and taking a guess,
by the way that string is formated, that then the script is splitting the
pairs into a hash? That the 2 variables could be merged into the single 
data structure that the algorithm uses.

But not seeing the algorithm envolved, and not knowing if that structure
is being used for something other than simpl checking the required fields
in the form (like maybe also checking for existing records in the db? before
creating a new one), hard to say for sure if that could in anyway affect
the use of the algorithm for the other forms that it processes.

So, I'll take a chance and really show my ignorance with suggesting something
that's probably a real hack, but may possibly hold down the fort with the least
disruption until a more elegant solution is pondered.

And that is - Don't pass that long winded string in the first place.
* Mark that form/page with an identifier (name=bogus001)
* Hard code the data structure directly into the script
* check for the identifier and use the hardcoded data for that particular page
* A big comment in the HTML noting the hack and pointing to the
  necessity of having to change the script also if the form changes.

Yuck! For sure, this is ugly.

Michael Dearman
---------------
-Opey "...but .5?"
-Andy "That's just a ratio. 2.5 kids out of 100 don't get enough to eat"
-Opey "But half a kid! Pooooor Haratio"



More information about the Phoenix-pm mailing list