I have a module that may accept several
optional parameters from the user.
The "standard" way of doing this is something like
"my-module/action/123/0/3/list/xyz" where everything after
"123" is optional, so doesn't show up in the menu entry.
I'm not crazy about this technique, although the
menu system does make it easy to use.
A)
The user has to
remember, or look up, the order of those parameters (I have to look them up
because I can't remember them, and I wrote it).
B)
If the user is happy
with an intermediate value (e.g. the "3" above), they still have to
specify it in order to use "list."
C)
There is no flexibility.
I was playing around and realized that $_GET
makes getting input parameters from the query string pretty easy. It also gives
me more flexibility in adding (or removing) the optional parameters, means the user
doesn't have to remember the order, and means only values that are desired have
to be entered.
Will I be tarred and feathered for going the
$_GET route?
Nancy E. Wichmann, PMP