[development] Handling optional parameters
Gábor Hojtsy
gabor at hojtsy.hu
Wed Sep 24 14:53:43 UTC 2008
On Wed, Sep 24, 2008 at 4:49 PM, Nancy Wichmann <nan_wich at bellsouth.net> wrote:
> 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?
It certainly makes more sense to use in-path arguments when they are
simple and obvious, and as soon as you start using filter parameters,
etc, Drupal core itself uses _GET parameters. Google also advises to
do so, especially if you need to move around parameters:
http://googlewebmastercentral.blogspot.com/2008/09/dynamic-urls-vs-static-urls.html
Gábor
More information about the development
mailing list