By berty_boy on
Hi there people,
I would like to pass varioables through the URL, but am completely confused how to do it...
Something like http://www.example.com/events/north/1222222
Where 1222222 would be the value to be passed. By looking around on the forums I think it has somehting to to do with the Menu functions and the items[] array?? Am I in the right ballpark?
Can anybody give quick, simple step-by-step instructions on how to do this?
Would be very grateful.
Cheers
And what a cool system Drupal is!
James
Comments
arg
if you use the function:
arg(2)
eg.
print arg(2);that will print 1222222
it's split on the / character
so that arg(0) = events
arg(1) = north
and arg(2) = 1222222
No page
Thanks for the reply,
When I do add this URL it is saying no such page available (I have URL Alias on), so it needs to stop looking for a page and take the variable after the / if you know what I mean :os
Cheers
James
no answer?
anyone have an answer for this?
i have the same exact problem. its not at all clear what i should be doing.
in my test_page_submit i use one of these two lines
return "doctorsearch/".$form_values['zipsearch'];
or
return "node/18/".$form_values['zipsearch'];
only the bottom one works. i get file not found for doctorsearch/
----------------
how can i send multiple values, do i always have to remember their position for arg()? that's kind of junky. I'm sure there's a way to say var=val&var2=val2 , etc?
can anyone throw a newbie a bone? :)