[support] Parsing QUERY_STRING

Metzler, David metzlerd at evergreen.edu
Fri Jan 23 15:58:47 UTC 2009


This sounds to me like you're trying to write a module, yes?  If that's
true what your're doing is easier than you might think, as drupal does
much of the url parsing for you. 

Understand that if you write your function as 

Function mymodule($index) 
{
  sql code goes here. 
} 

And you register that function on a menu path 'viewform', that function
will get $index as a parameter already, that is index will already have
'wcab10' as the index. 

Would suggest getting a copy of the drupal pro development book and also
looking at the developer docs at http://api.drupal.org and more
specifically at http://api.drupal.org/api/function/page_example_baz/6

Good luck, 

Dave

-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Scott
Sent: Thursday, January 22, 2009 5:19 PM
To: support at drupal.org
Subject: [support] Parsing QUERY_STRING

I have posted at http://drupal.org/node/361193 a request for information
but have yet to hear anything back.  So, I thought I'd try here.  I am
rewriting a web site from php4 to drupal 6.  One important section of
the old site uses QUERY_STRING to pass a parameter thusly:
"../viewform/wcab10"
The string "viewform" represents an actual page but "wcab10" is an index
value.  I'm trying to figure out how to do this with drupal.  So far it
looks as if I need to create nodes for all possible index field values.
Rather I wish to land on viewform (node/xxx) and use "wcab10" as a
parameter for a module (select * from table where index_field =
"wcab10").



--
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list