Hi,

In my function, i am trying to get output as per some parameter, if parameter matches, an array is returned, now i want the visitor to goto a new page and want to display the values returned in this array on the next redirected page.

I am using this statement:

drupal_goto('step2');

But how can i post values to next page, please suggest!

Thanks,
Kul.

Comments

Anonymous’s picture

The 2nd arg of drupal_goto takes a query string so you can do this:

drupal_goto('step2', 'arg1=1&arg2=2');

Otherwise you can turn your form into a multistep one so that the variables are available across each step, or save your data in session variables.

kuldeepkaundal’s picture

yes, i've done exactly that, but then these values are appended in the url....

logan.H’s picture

Hope you need something like this drupal_http_request
this will allow you to post the value to url
http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ht...

Anonymous’s picture

Yep that's where they're supposed to go if you append a query to a URL. If you want to POST values to another page you need to invoke the POST manually, or implement a multistep form as I suggested above