Although, "...many lines of code later..." does cause some pause, I have to admit.
"many lines of code" = about 1,500
and that's another style question. It's that big because it performs four phases of a multi-phase user inquiry to a database. That is, offer some options in a form, receive user selections, search database for more options that follow loically from the user's selections, and repeat total of four times. All phases use a large collection of identical constants, many identical sub-routines, but do a lot of crunching that's unique to that phase. So Having all four phases in one script with a phase-sorter at the beginning means:
- reduced total code lines because common elements are not rerpoduced in separate scripts
- during development, a change to any common element only has to be made once instad of four times.
At the same time, I've sometimes wondered - is this considered a large script? Unweildy? Does it impact peformance to have to load one large script?
Forget that fear of gravity,
Get a little savagery in your life.