At the result page of a workflow-ng process, I have a landing page with a textarea where I can put PHP and receive two variables.

I'd like to get these two variables over to a module. Basically, I have some code that I've run in the php space and it works with the two variables and I'd like to move it out of the database and into a module with a specific url. The code's going to get pretty big.

Is there a clever function that I can put in the PHP textarea that will redirect to the url and take the two variables as arguments already in the Drupal API that I haven't been able to find? (Oh, that would be too easy.)

Barring a miracle, can anyone suggest any strategies for accomplishing what I'm trying to do?

Disclaimer: this is my first module. While I have the code working fine in the php textarea, I'm not terribly experienced with the fine points of how Drupal does data. I'm hoping this will be obvious to someone experienced. Thank you in advance.

Comments

nodiac’s picture

Have found two redirect functions in the API, but don't really understand the API documentation. Can the $query string be the variables that I'm trying to move? (I'm unclear on what a $query string is, or what the other parameters are.) Can I stick a reference number in there so I can shove the variables into the variables table with names with the string in them so I can call them back with the module?

Here's the link to the drupal_goto() function:
http://api.drupal.org/api/function/drupal_goto/5

Here's the link to the drupal_get_destination() function:
http://api.drupal.org/api/function/drupal_get_destination/5

Can someone please help me understand the API on this? Will these work for what I want to do? Can I put objects in the $query string?

I'd be very grateful for any help with this. Thanks in advance.