By jeff00seattle on
Hi
I know this is really basic, but how do I parse and pass a URL's query string to the appropriate module?
Sending me a tutorial link or two would be GREAT!
My URL with query string maybe as simple as Sorting a column upon a table:
.../index.php?q=admin/reports/storage/tables&sort=desc&order=Name
Or requesting to Perform an action requested by a link:
.../index.php?q=admin/reports/storage/tables&action=delete&id=15
Thanks
Comments
You can use php $_POST or
You can use php $_POST or $_GET to get the url
or you can try use drupal arg() example http://drupal.org/this-is-argument-0/this-is-argument1
--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com
Is there not a native Drupal function?
Thanks for the reply.
I knew I could do it with $_REQUEST, but I thought maybe there might have been a native Drupal function that parses query strings.
Drupal's request dispatcher called "Menu"
Hi.
Drupal calls it's request dispatcher "Menu". http://api.drupal.org/api/group/menu
....
Hook_menu allows you to define a request url and dispatch requests to you code.
...
What goofus means is that in Drupal it's customary to use paths instead of query parameters. Deleting could be carried out by "admin/reports/storage/tables/15/delete". (As for sorting, the pager already handles this for you.)